diff --git a/lib/isodoc/presentation_function/autonum.rb b/lib/isodoc/presentation_function/autonum.rb index e1b15cea..b6156d02 100644 --- a/lib/isodoc/presentation_function/autonum.rb +++ b/lib/isodoc/presentation_function/autonum.rb @@ -48,6 +48,8 @@ def fmt_label(_label, _number, ids) # Remove ".blank?" tests if we want empty delim placeholders for manipulation def fmt_caption(label, elem, name, ids, delims) + label.blank? || %r{#{c}#{f}" + "#{c}#{f}" end end end diff --git a/lib/isodoc/xref/xref_sect_gen.rb b/lib/isodoc/xref/xref_sect_gen.rb index c90b8d12..66b4fee0 100644 --- a/lib/isodoc/xref/xref_sect_gen.rb +++ b/lib/isodoc/xref/xref_sect_gen.rb @@ -206,7 +206,7 @@ def annex_name_lbl(clause, num) title = Common::case_with_markup(@labels["annex"], "capital", @script) s = labelled_autonum(title, num) - "#{s}
#{obl}" + "#{s}
#{obl}" end def annex_name_anchors(clause, num, level) diff --git a/spec/isodoc/blocks_notes_spec.rb b/spec/isodoc/blocks_notes_spec.rb index c4bfb457..51a39275 100644 --- a/spec/isodoc/blocks_notes_spec.rb +++ b/spec/isodoc/blocks_notes_spec.rb @@ -23,9 +23,7 @@ Foreword - Foreword - @@ -149,9 +147,7 @@ Foreword - Foreword - @@ -429,9 +425,7 @@ Foreword - Foreword - @@ -557,9 +551,7 @@ Foreword - Foreword -
@@ -662,9 +654,7 @@ Foreword - Foreword - @@ -724,9 +714,7 @@ Foreword - Foreword - @@ -769,25 +757,19 @@ Foreword - Foreword - Title - Title -

Only use paddy or parboiled rice for the determination of husked rice yield.

Title - Title -

Only use paddy or parboiled rice for the determination of husked rice yield.

@@ -846,9 +828,7 @@ Foreword - Foreword - Title @@ -856,9 +836,9 @@ Box 1 +  — Title -
Box diff --git a/spec/isodoc/blocks_spec.rb b/spec/isodoc/blocks_spec.rb index 62eccf7e..3dacb782 100644 --- a/spec/isodoc/blocks_spec.rb +++ b/spec/isodoc/blocks_spec.rb @@ -112,11 +112,11 @@ 1 . + Change Clause - Clause @@ -136,9 +136,9 @@ Table 2 +  — Edges of triangle and quadrilateral cells -
Table @@ -184,9 +184,7 @@
Imago - Imago -
@@ -321,18 +319,16 @@ Foreword - Foreword - Title EXAMPLE +  — Title - Example @@ -341,9 +337,7 @@ Sample - Sample - @@ -457,9 +451,7 @@ Foreword - Foreword - @@ -480,9 +472,9 @@ EXAMPLE 2 +  — Title - Example @@ -550,9 +542,7 @@ Foreword - Foreword - r = 1 % @@ -598,16 +588,16 @@ - - - - Annex - A - -
- (informative) -
-
+ + + + Annex + A + + +
+ (informative) +
Annex A @@ -871,9 +861,7 @@ Foreword - Foreword -

This International Standard gives the minimum specifications for rice (Oryza sativa L.) which is subject to international trade. It is applicable to the following types: husked rice and milled rice, parboiled or not, intended for direct human consumption. It is neither applicable to other products derived from rice, nor to waxy rice (glutinous rice).

@@ -989,9 +977,7 @@ Foreword - Foreword - @@ -1050,16 +1036,16 @@ - - - - Annex - A - -
- (informative) -
-
+ + + + Annex + A + + +
+ (informative) +
Annex A @@ -1089,9 +1075,7 @@ Bibliography - Bibliography - R. FIELDING, J. GETTYS, J. MOGUL, H. FRYSTYK, L. MASINTER, P. LEACH and T. BERNERS-LEE. Hypertext Transfer Protocol — HTTP/1.1. In: RFC. 1999. Fremont, CA. [1] @@ -1233,9 +1217,7 @@ Foreword - Foreword - @@ -1393,9 +1375,7 @@ Foreword - Foreword - @@ -1510,9 +1490,7 @@ Foreword - Foreword - <A> Hello @@ -1734,11 +1712,11 @@ 1 . - - - - Clause 1 + + + + Clause 1 Clause @@ -1752,11 +1730,11 @@ . 1 . - - - - Clause 1A + + + + Clause 1A Clause @@ -1774,11 +1752,11 @@ . 1 . - - - - Clause 1Aa + + + + Clause 1Aa Clause @@ -1799,11 +1777,11 @@ . 2 . - - - - Clause 1Ab + + + + Clause 1Ab Clause @@ -1823,11 +1801,11 @@ . 2 . - - - - Clause 1B + + + + Clause 1B Clause @@ -1845,11 +1823,11 @@ . 1 . - - - - Clause 1Ba + + + + Clause 1Ba Clause @@ -1868,11 +1846,11 @@ 2 . - - - - Clause 2 + + + + Clause 2 Clause diff --git a/spec/isodoc/figures_spec.rb b/spec/isodoc/figures_spec.rb index 91201154..b57f5a2a 100644 --- a/spec/isodoc/figures_spec.rb +++ b/spec/isodoc/figures_spec.rb @@ -76,7 +76,7 @@ INPUT presxml = <<~OUTPUT - + Table of contents @@ -84,9 +84,7 @@ Foreword - - Foreword - + Foreword
@@ -101,16 +99,16 @@ Figure 1 -  — - - Split-it-right - sample - divider - -

X

-
-
+  — + + Split-it-right + sample + divider + +

X

+
+
Figure @@ -184,11 +182,11 @@ 1 . - - - - Normative References + + + + Normative References Clause @@ -208,37 +206,37 @@ - - + + Annex A - -
- (informative) -
+ + +
+ (informative)
Annex A -
- - - Figure - A - . - 1 - - - - Figure - A - . - 1 - -
A <
-  B
-
+
+ + + Figure + A + . + 1 + + + + Figure + A + . + 1 + +
A <
+         B
+
@@ -466,9 +464,7 @@ Foreword - Foreword -
Overall title @@ -476,9 +472,9 @@ Figure 1 +  — Overall title - Figure @@ -492,9 +488,9 @@ 1 - 1 +  — Subfigure 1 - Figure @@ -512,9 +508,9 @@ 1 - 2 +  — Subfigure 2 - Figure @@ -651,9 +647,7 @@ Foreword - Foreword -
@@ -668,6 +662,7 @@ Diagram 1 +  — Split-it-right @@ -677,7 +672,6 @@

X

- Diagram @@ -690,9 +684,7 @@
Key of figure - Key of figure -

a

@@ -757,9 +749,7 @@ Foreword - Foreword -
@@ -811,9 +801,7 @@ Foreword - Foreword -
@@ -939,9 +927,7 @@ Foreword - Foreword -
diff --git a/spec/isodoc/footnotes_spec.rb b/spec/isodoc/footnotes_spec.rb index f2fe8c5e..2625b48a 100644 --- a/spec/isodoc/footnotes_spec.rb +++ b/spec/isodoc/footnotes_spec.rb @@ -29,9 +29,7 @@ Foreword - Foreword -

A. @@ -196,9 +194,7 @@ Foreword - Foreword -

A.

B.

@@ -217,9 +213,7 @@ Introduction - Introduction -

Second note.

@@ -385,9 +379,7 @@ Foreword - Foreword -
  1. @@ -407,9 +399,7 @@ Introduction - Introduction -

    Second note.

    diff --git a/spec/isodoc/i18n_spec.rb b/spec/isodoc/i18n_spec.rb index 9b8f1c63..a7349faf 100644 --- a/spec/isodoc/i18n_spec.rb +++ b/spec/isodoc/i18n_spec.rb @@ -76,349 +76,339 @@ INPUT presxml = <<~PRESXML - - - en - - published - withdrawn - - 2 - second edition - - brochure - - - - - Table of contents - - - Foreword - - - Foreword - - -

    - See - - Clause - 5 - -

    -
    - - Introduction - - - Introduction - - - - Introduction Subsection - - - Introduction Subsection - - - - -
    - - - Scope - - - 1 - . - - - - Scope - - - - Clause - 1 - -

    Text

    -
    - - Terms, definitions, symbols and abbreviated terms - - - 3 - . - - - - Terms, definitions, symbols and abbreviated terms - - - - Clause - 3 - - - Normal Terms - - - 3 - . - 1 - . - - - - Normal Terms - - - - Clause - 3 - . - 1 - - - - - 3 - . - 1 - . - 1 - . - - - - Clause - 3 - . - 1 - . - 1 - - - Term2 - - - - - Symbols - - - 3 - . - 2 - . - - - - Symbols - - - - Clause - 3 - . - 2 - -
    -
    Symbol
    -
    Definition
    -
    -
    -
    - - Symbols - - - 4 - . - - - - Symbols - - - - Clause - 4 - -
    -
    Symbol
    -
    Definition
    -
    -
    - - Clause 4 - - - 5 - . - - - - Clause 4 - - - - Clause - 5 - - - Introduction - - - 5 - . - 1 - . - - - - Introduction - - - - Clause - 5 - . - 1 - - - - Clause 4.2 - - - 5 - . - 2 - . - - - - Clause 4.2 - - - - Clause - 5 - . - 2 - - - - - Normative References - - - 2 - . - - - - Normative References - - - - Clause - 2 - - -
    - - - <strong>Annex</strong> - - - - - Annex - A - -
    - (normative) - -
    -
    -
    - - Annex - -
    -
    - - Annex - A - - - Annex A.1 - - - A - . - 1 - . - - - - Annex A.1 - - - - Annex - A - . - 1 - - - Annex A.1a - - - A - . - 1 - . - 1 - . - - - - Annex A.1a - - - - Annex - A - . - 1 - . - 1 - - - -
    - - - Bibliography - - - Bibliography - - - - Bibliography Subsection - - - Bibliography Subsection - - - - - -
    + + + en + + published + withdrawn + + 2 + second edition + + brochure + + + + + Table of contents + + + Foreword + + Foreword + +

    + See + + Clause + 5 + +

    +
    + + Introduction + + Introduction + + + Introduction Subsection + + Introduction Subsection + + + +
    + + + Scope + + + 1 + . + + + + + Scope + + + Clause + 1 + +

    Text

    +
    + + Terms, definitions, symbols and abbreviated terms + + + 3 + . + + + + + Terms, definitions, symbols and abbreviated terms + + + Clause + 3 + + + Normal Terms + + + 3 + . + 1 + . + + + + + Normal Terms + + + Clause + 3 + . + 1 + + + + + 3 + . + 1 + . + 1 + . + + + + Clause + 3 + . + 1 + . + 1 + + + Term2 + + + + + Symbols + + + 3 + . + 2 + . + + + + + Symbols + + + Clause + 3 + . + 2 + +
    +
    Symbol
    +
    Definition
    +
    +
    +
    + + Symbols + + + 4 + . + + + + + Symbols + + + Clause + 4 + +
    +
    Symbol
    +
    Definition
    +
    +
    + + Clause 4 + + + 5 + . + + + + + Clause 4 + + + Clause + 5 + + + Introduction + + + 5 + . + 1 + . + + + + + Introduction + + + Clause + 5 + . + 1 + + + + Clause 4.2 + + + 5 + . + 2 + . + + + + + Clause 4.2 + + + Clause + 5 + . + 2 + + + + + Normative References + + + 2 + . + + + + + Normative References + + + Clause + 2 + + +
    + + + <strong>Annex</strong> + + + + + Annex + A + + +
    + (normative) + +
    +
    +
    + + Annex + +
    + + Annex + A + + + Annex A.1 + + + A + . + 1 + . + + + + + Annex A.1 + + + Annex + A + . + 1 + + + Annex A.1a + + + A + . + 1 + . + 1 + . + + + + + Annex A.1a + + + Annex + A + . + 1 + . + 1 + + + +
    + + + Bibliography + + Bibliography + + + Bibliography Subsection + + Bibliography Subsection + + + + +
    PRESXML html = <<~"OUTPUT" @@ -550,9 +540,7 @@ Foreword - Foreword -

    See @@ -646,349 +634,339 @@ INPUT presxml = <<~PRESXML - - - fr - - published - withdrawn - - 2 - deuxième édition - - brochure - - - - - Sommaire - - - Foreword - - - Foreword - - -

    - See - - Article - 5 - -

    -
    - - Introduction - - - Introduction - - - - Introduction Subsection - - - Introduction Subsection - - - - - - - - Scope - - - 1 - . - - - - Scope - - - - Article - 1 - -

    Text

    -
    - - Terms, definitions, symbols and abbreviated terms - - - 3 - . - - - - Terms, definitions, symbols and abbreviated terms - - - - Article - 3 - - - Normal Terms - - - 3 - . - 1 - . - - - - Normal Terms - - - - Article - 3 - . - 1 - - - - - 3 - . - 1 - . - 1 - . - - - - Article - 3 - . - 1 - . - 1 - - - Term2 - - - - - Symboles - - - 3 - . - 2 - . - - - - Symboles - - - - Article - 3 - . - 2 - -
    -
    Symbol
    -
    Definition
    -
    -
    -
    - - Symboles - - - 4 - . - - - - Symboles - - - - Article - 4 - -
    -
    Symbol
    -
    Definition
    -
    -
    - - Clause 4 - - - 5 - . - - - - Clause 4 - - - - Article - 5 - - - Introduction - - - 5 - . - 1 - . - - - - Introduction - - - - Article - 5 - . - 1 - - - - Clause 4.2 - - - 5 - . - 2 - . - - - - Clause 4.2 - - - - Article - 5 - . - 2 - - - - - Normative References - - - 2 - . - - - - Normative References - - - - Article - 2 - - -
    - - - <strong>Annex</strong> - - - - - Annexe - A - -
    - (normative) - -
    -
    -
    - - Annex - -
    -
    - - Annexe - A - - - Annex A.1 - - - A - . - 1 - . - - - - Annex A.1 - - - - Annexe - A - . - 1 - - - Annex A.1a - - - A - . - 1 - . - 1 - . - - - - Annex A.1a - - - - Annexe - A - . - 1 - . - 1 - - - -
    - - - Bibliographie - - - Bibliographie - - - - Bibliography Subsection - - - Bibliography Subsection - - - - - - + + + fr + + published + withdrawn + + 2 + deuxième édition + + brochure + + + + + Sommaire + + + Foreword + + Foreword + +

    + See + + Article + 5 + +

    +
    + + Introduction + + Introduction + + + Introduction Subsection + + Introduction Subsection + + + +
    + + + Scope + + + 1 + . + + + + + Scope + + + Article + 1 + +

    Text

    +
    + + Terms, definitions, symbols and abbreviated terms + + + 3 + . + + + + + Terms, definitions, symbols and abbreviated terms + + + Article + 3 + + + Normal Terms + + + 3 + . + 1 + . + + + + + Normal Terms + + + Article + 3 + . + 1 + + + + + 3 + . + 1 + . + 1 + . + + + + Article + 3 + . + 1 + . + 1 + + + Term2 + + + + + Symboles + + + 3 + . + 2 + . + + + + + Symboles + + + Article + 3 + . + 2 + +
    +
    Symbol
    +
    Definition
    +
    +
    +
    + + Symboles + + + 4 + . + + + + + Symboles + + + Article + 4 + +
    +
    Symbol
    +
    Definition
    +
    +
    + + Clause 4 + + + 5 + . + + + + + Clause 4 + + + Article + 5 + + + Introduction + + + 5 + . + 1 + . + + + + + Introduction + + + Article + 5 + . + 1 + + + + Clause 4.2 + + + 5 + . + 2 + . + + + + + Clause 4.2 + + + Article + 5 + . + 2 + + + + + Normative References + + + 2 + . + + + + + Normative References + + + Article + 2 + + +
    + + + <strong>Annex</strong> + + + + + Annexe + A + + +
    + (normative) + +
    +
    +
    + + Annex + +
    + + Annexe + A + + + Annex A.1 + + + A + . + 1 + . + + + + + Annex A.1 + + + Annexe + A + . + 1 + + + Annex A.1a + + + A + . + 1 + . + 1 + . + + + + + Annex A.1a + + + Annexe + A + . + 1 + . + 1 + + + +
    + + + Bibliographie + + Bibliographie + + + Bibliography Subsection + + Bibliography Subsection + + + + +
    PRESXML html = <<~"OUTPUT" @@ -1162,360 +1140,350 @@ presxml = <<~PRESXML - - zh - - - published - withdrawn - - 2 - 第第二版 - - brochure - - - - - 目 次 - - - Foreword - - - Foreword - - -

    - See - - - 5 - -

    -
    - - Introduction - - - Introduction - - - - Introduction Subsection - - - Introduction Subsection - - - - -
    - - - Scope - - - 1 - . - - - - Scope - - - - - 1 - -

    - ISO 712,第1~1表 -

    -
    - - Terms, definitions, symbols and abbreviated terms - - - 3 - . - - - - Terms, definitions, symbols and abbreviated terms - - - - - 3 - - - Normal Terms - - - 3 - . - 1 - . - - - - Normal Terms - - - - - 3 - . - 1 - - - - - 3 - . - 1 - . - 1 - . - - - - - 3 - . - 1 - . - 1 - - - Term2 - - - - - 符号 - - - 3 - . - 2 - . - - - - 符号 - - - - - 3 - . - 2 - -
    -
    Symbol
    -
    Definition
    -
    -
    -
    - - 符号 - - - 4 - . - - - - 符号 - - - - - 4 - -
    -
    Symbol
    -
    Definition
    -
    -
    - - Clause 4 - - - 5 - . - - - - Clause 4 - - - - - 5 - - - Introduction - - - 5 - . - 1 - . - - - - Introduction - - - - - 5 - . - 1 - - - - Clause 4.2 - - - 5 - . - 2 - . - - - - Clause 4.2 - - - - - 5 - . - 2 - - - - - Normative References - - - 2 - . - - - - Normative References - - - - - 2 - - - - Cereals and cereal products - . - - ISO 712 - ISO 712 - ISO 712, - - -
    - - - <strong>Annex</strong> - - - - - 附件 - A - -
    - (规范性附录) - -
    -
    -
    - - Annex - -
    -
    - - 附件 - A - - - Annex A.1 - - - A - . - 1 - . - - - - Annex A.1 - - - - 附件 - A - . - 1 - - - Annex A.1a - - - A - . - 1 - . - 1 - . - - - - Annex A.1a - - - - 附件 - A - . - 1 - . - 1 - - - -
    - - - Bibliography - - - Bibliography - - - - Bibliography Subsection - - - Bibliography Subsection - - - - - -
    + + zh + + + published + withdrawn + + 2 + 第第二版 + + brochure + + + + + 目 次 + + + Foreword + + Foreword + +

    + See + + + 5 + +

    +
    + + Introduction + + Introduction + + + Introduction Subsection + + Introduction Subsection + + + +
    + + + Scope + + + 1 + . + + + + + Scope + + + + 1 + +

    + ISO 712,第1~1表 +

    +
    + + Terms, definitions, symbols and abbreviated terms + + + 3 + . + + + + + Terms, definitions, symbols and abbreviated terms + + + + 3 + + + Normal Terms + + + 3 + . + 1 + . + + + + + Normal Terms + + + + 3 + . + 1 + + + + + 3 + . + 1 + . + 1 + . + + + + + 3 + . + 1 + . + 1 + + + Term2 + + + + + 符号 + + + 3 + . + 2 + . + + + + + 符号 + + + + 3 + . + 2 + +
    +
    Symbol
    +
    Definition
    +
    +
    +
    + + 符号 + + + 4 + . + + + + + 符号 + + + + 4 + +
    +
    Symbol
    +
    Definition
    +
    +
    + + Clause 4 + + + 5 + . + + + + + Clause 4 + + + + 5 + + + Introduction + + + 5 + . + 1 + . + + + + + Introduction + + + + 5 + . + 1 + + + + Clause 4.2 + + + 5 + . + 2 + . + + + + + Clause 4.2 + + + + 5 + . + 2 + + + + + Normative References + + + 2 + . + + + + + Normative References + + + + 2 + + + + Cereals and cereal products + . + + ISO 712 + ISO 712 + ISO 712, + + +
    + + + <strong>Annex</strong> + + + + + 附件 + A + + +
    + (规范性附录) + +
    +
    +
    + + Annex + +
    + + 附件 + A + + + Annex A.1 + + + A + . + 1 + . + + + + + Annex A.1 + + + 附件 + A + . + 1 + + + Annex A.1a + + + A + . + 1 + . + 1 + . + + + + + Annex A.1a + + + 附件 + A + . + 1 + . + 1 + + + +
    + + + Bibliography + + Bibliography + + + Bibliography Subsection + + Bibliography Subsection + + + + + PRESXML html = <<~"OUTPUT" @@ -1706,406 +1674,396 @@ INPUT presxml = <<~OUTPUT - - - eo - - - published - publikigita - withdrawn - fortirita - - 2 - eldono dua - - brochure - broŝuro - - - - - - - - Foreword - - - Foreword - - -

    - See - - klaŭzo - 5 - -

    -

    - See - - tabelo - 1 - -

    - - - - Tabelo - 1 - - - - tabelo - 1 - -
    -
    - - Introduction - - - Introduction - - - - Introduction Subsection - - - Introduction Subsection - - - - -
    - - - Scope - - - 1 - . - - - - Scope - - - - klaŭzo - 1 - -

    - ISO 712, Tabelo 1–1 -

    -
    - - Terms, definitions, symbols and abbreviated terms - - - 3 - . - - - - Terms, definitions, symbols and abbreviated terms - - - - klaŭzo - 3 - - - Normal Terms - - - 3 - . - 1 - . - - - - Normal Terms - - - - klaŭzo - 3 - . - 1 - - - - - 3 - . - 1 - . - 1 - . - - - - klaŭzo - 3 - . - 1 - . - 1 - - - Term2 - - - - - Simboloj kai mallongigitaj terminoj - - - 3 - . - 2 - . - - - - Simboloj kai mallongigitaj terminoj - - - - klaŭzo - 3 - . - 2 - -
    -
    Symbol
    -
    Definition
    -
    -
    -
    - - Simboloj kai mallongigitaj terminoj - - - 4 - . - - - - Simboloj kai mallongigitaj terminoj - - - - klaŭzo - 4 - -
    -
    Symbol
    -
    Definition
    -
    -
    - - Clause 4 - - - 5 - . - - - - Clause 4 - - - - klaŭzo - 5 - - - Introduction - - - 5 - . - 1 - . - - - - Introduction - - - - klaŭzo - 5 - . - 1 - - - - - NOTO - - - - - - - - - - - - - - Clause 4.2 - - - 5 - . - 2 - . - - - - Clause 4.2 - - - - klaŭzo - 5 - . - 2 - - - - - Normative References - - - 2 - . - - - - Normative References - - - - klaŭzo - 2 - - - - Cereals and cereal products - . - - ISO 712 - ISO 712 - ISO 712, - - -
    - - - <strong>Annex</strong> - - - - - - Aldono - - A - -
    - (normative) - -
    -
    -
    - - Annex - -
    -
    - - - aldono - - A - - - Annex A.1 - - - A - . - 1 - . - - - - Annex A.1 - - - - - aldono - - A - . - 1 - - - Annex A.1a - - - A - . - 1 - . - 1 - . - - - - Annex A.1a - - - - - aldono - - A - . - 1 - . - 1 - - - -
    - - - Bibliography - - - Bibliography - - - - Bibliography Subsection - - - Bibliography Subsection - - - - - -
    + + + eo + + + published + publikigita + withdrawn + fortirita + + 2 + eldono dua + + brochure + broŝuro + + + + + + + + Foreword + + Foreword + +

    + See + + klaŭzo + 5 + +

    +

    + See + + tabelo + 1 + +

    + + + + Tabelo + 1 + + + + tabelo + 1 + +
    +
    + + Introduction + + Introduction + + + Introduction Subsection + + Introduction Subsection + + + +
    + + + Scope + + + 1 + . + + + + + Scope + + + klaŭzo + 1 + +

    + ISO 712, Tabelo 1–1 +

    +
    + + Terms, definitions, symbols and abbreviated terms + + + 3 + . + + + + + Terms, definitions, symbols and abbreviated terms + + + klaŭzo + 3 + + + Normal Terms + + + 3 + . + 1 + . + + + + + Normal Terms + + + klaŭzo + 3 + . + 1 + + + + + 3 + . + 1 + . + 1 + . + + + + klaŭzo + 3 + . + 1 + . + 1 + + + Term2 + + + + + Simboloj kai mallongigitaj terminoj + + + 3 + . + 2 + . + + + + + Simboloj kai mallongigitaj terminoj + + + klaŭzo + 3 + . + 2 + +
    +
    Symbol
    +
    Definition
    +
    +
    +
    + + Simboloj kai mallongigitaj terminoj + + + 4 + . + + + + + Simboloj kai mallongigitaj terminoj + + + klaŭzo + 4 + +
    +
    Symbol
    +
    Definition
    +
    +
    + + Clause 4 + + + 5 + . + + + + + Clause 4 + + + klaŭzo + 5 + + + Introduction + + + 5 + . + 1 + . + + + + + Introduction + + + klaŭzo + 5 + . + 1 + + + + + NOTO + + + + + + + + + + + + + + Clause 4.2 + + + 5 + . + 2 + . + + + + + Clause 4.2 + + + klaŭzo + 5 + . + 2 + + + + + Normative References + + + 2 + . + + + + + Normative References + + + klaŭzo + 2 + + + + Cereals and cereal products + . + + ISO 712 + ISO 712 + ISO 712, + + +
    + + + <strong>Annex</strong> + + + + + + Aldono + + A + + +
    + (normative) + +
    +
    +
    + + Annex + +
    + + + aldono + + A + + + Annex A.1 + + + A + . + 1 + . + + + + + Annex A.1 + + + + aldono + + A + . + 1 + + + Annex A.1a + + + A + . + 1 + . + 1 + . + + + + + Annex A.1a + + + + aldono + + A + . + 1 + . + 1 + + + +
    + + + Bibliography + + Bibliography + + + Bibliography Subsection + + Bibliography Subsection + + + + +
    OUTPUT html = <<~OUTPUT @@ -2382,25 +2340,19 @@ 版權 - 版 權 - 版權聲明 - 版權聲明 - 版權 - 版 權 - @@ -2413,17 +2365,13 @@ 解題 - 解 題 - 文件序言 - 文件序言 -

    This is a preamble

    @@ -2431,32 +2379,24 @@ 簡介 - 簡 介 - 引言部分 - 引言部分 - 附則 - 附則 - Ad - Ad - diff --git a/spec/isodoc/inline_spec.rb b/spec/isodoc/inline_spec.rb index e15c44e4..28f1b1a3 100644 --- a/spec/isodoc/inline_spec.rb +++ b/spec/isodoc/inline_spec.rb @@ -752,9 +752,7 @@ Foreword - Foreword -

    @@ -809,9 +807,7 @@ Foreword - Foreword -

    @@ -887,9 +883,7 @@ Foreword - Foreword -

    @@ -1111,9 +1105,7 @@ Avant-propos - Avant-propos -

    ISO 712 @@ -1234,9 +1226,7 @@ Avant-propos - Avant-propos -

    ISO 712 @@ -1402,9 +1392,7 @@ Foreword - Foreword -

    BSI BS EN ISO 19011:2018 — TC @@ -1464,57 +1452,43 @@ ABC - ABC - ABC/DEF - ABC/DEF - ABC - ABC - GHI/JKL - GHI/JKL - DEF - DEF - ABC/DEF - ABC/DEF - DEF - DEF -

    A B D E

    diff --git a/spec/isodoc/presentation_xml_maths_spec.rb b/spec/isodoc/presentation_xml_maths_spec.rb index b95c3c92..19de828f 100644 --- a/spec/isodoc/presentation_xml_maths_spec.rb +++ b/spec/isodoc/presentation_xml_maths_spec.rb @@ -910,9 +910,7 @@ Foreword - Foreword - diff --git a/spec/isodoc/presentation_xml_metadata_spec.rb b/spec/isodoc/presentation_xml_metadata_spec.rb index 2a137f5c..af8584ce 100644 --- a/spec/isodoc/presentation_xml_metadata_spec.rb +++ b/spec/isodoc/presentation_xml_metadata_spec.rb @@ -50,9 +50,7 @@ Foreword - Foreword -

    @@ -71,9 +69,9 @@ Figure 1 +  — Split-it-right sample divider - Figure @@ -110,9 +108,7 @@ user-css - user-css - .green { background-color: green } diff --git a/spec/isodoc/presentation_xml_spec.rb b/spec/isodoc/presentation_xml_spec.rb index fe094290..9e0b6fd2 100644 --- a/spec/isodoc/presentation_xml_spec.rb +++ b/spec/isodoc/presentation_xml_spec.rb @@ -42,23 +42,17 @@ A - A - B - B - C - C - @@ -177,110 +171,110 @@ INPUT presxml = <<~OUTPUT - - - - - Table of contents - - - - - Clause - - - - Annex - A - -
    - (normative) - . - - - - Clause -
    -
    - - Annex - A - -

    Text

    - - Subclause - - - - Annex - A - -
    - (normative) - . - - - - Subclause -
    -
    - - Annex - A - - “A” ‘B’ - - Clause - A - - - x - - x - - -

    Text

    -
    - - - - - <strong>Clause</strong> - - - - - Annex - A - -
    - (normative) - -
    -
    -
    - - Clause - -
    -
    - - Annex - A - - - Clause - A - - - x - - x - - -

    Text

    -
    - + + + + + Table of contents + + + + + Clause + + + + Annex + A + + +
    + (normative) + . + + + + Clause +
    + + Annex + A + +

    Text

    + + Subclause + + + + Annex + A + + +
    + (normative) + . + + + + Subclause +
    + + Annex + A + + “A” ‘B’ + + Clause + A + + + x + + x + + +

    Text

    +
    +
    +
    + + + <strong>Clause</strong> + + + + + Annex + A + + +
    + (normative) + +
    +
    +
    + + Clause + +
    + + Annex + A + + + Clause + A + + + x + + x + + +

    Text

    +
    +
    OUTPUT html = <<~OUTPUT #{HTML_HDR} @@ -1003,9 +997,7 @@ Section - Section -

    @@ -1358,100 +1350,98 @@ INPUT presxml = <<~OUTPUT - - Section - - - 1 - . - - - - Section - - - - Clause - 1 - -

    - First - - - Figure - 1 -  — - First - - - - Figure - 1 - -
    - - - - EXAMPLE - 1 - - - - Example - 1 - -
    - Second - - - Figure - 2 -  — - Second - - - - Figure - 2 - -
    -
    - - - - EXAMPLE - 2 - - - - Example - 2 - -
    - Unnamed - - - Unnamed - - -
    -
    -
    - Third - - - Figure - 3 -  — - Third - - - - Figure - 3 - -
    - + + Section + + + 1 + . + + + + + Section + + + Clause + 1 + +
    + First + + + Figure + 1 + +  — + First + + + Figure + 1 + +
    + + + + EXAMPLE + 1 + + + + Example + 1 + +
    + Second + + + Figure + 2 + +  — + Second + + + Figure + 2 + +
    +
    + + + + EXAMPLE + 2 + + + + Example + 2 + +
    + Unnamed + + Unnamed + +
    +
    +
    + Third + + + Figure + 3 + +  — + Third + + + Figure + 3 + +
    +
    OUTPUT expect(Xml::C14n.format(strip_guid(Nokogiri::XML(IsoDoc::PresentationXMLConvert .new(presxml_options) @@ -1481,65 +1471,63 @@ INPUT presxml = <<~OUTPUT - - - - - Table of contents - - - - - Scope - - - 1 - . - - - - Scope - - - - Clause - 1 - -

    A

    -

    - ISO 639-2 -

    -
    - - Terms and definitions - - - 2 - . - - - - Terms and definitions - - - - Clause - 2 - -

    No terms and definitions are listed in this document.

    -
    - -
    - - -
    + + + + + Table of contents + + + + + Scope + + + 1 + . + + + + + Scope + + + Clause + 1 + +

    A

    +

    + ISO 639-2 +

    +
    + + Terms and definitions + + + 2 + . + + + + + Terms and definitions + + + Clause + 2 + +

    No terms and definitions are listed in this document.

    +
    + +
    + + +
    OUTPUT expect(Xml::C14n.format(strip_guid(IsoDoc::PresentationXMLConvert .new(presxml_options) @@ -1600,9 +1588,7 @@ Foreword - Foreword - @@ -1657,7 +1643,9 @@

    FL 3

    FL 4

    - ForewordForeword + Foreword + Foreword +

    FL 5

    FL 6

    @@ -1804,22 +1792,31 @@
    INPUT presxml = <<~OUTPUT - - weather:"OGC Weather Symbols",conscript:"Code 2000" - - Table of contents - - - - ForewordForeword -

    -
    + + + weather:"OGC Weather Symbols",conscript:"Code 2000" + + + + Table of contents + + + Foreword + + Foreword + +

    + +

    +
    +
    +
    OUTPUT expect(Xml::C14n.format(strip_guid(IsoDoc::PresentationXMLConvert .new(presxml_options) .convert("test", input, true)) .sub(%r{.*}m, ""))) - .to be_equivalent_to (presxml) + .to be_equivalent_to Xml::C14n.format(presxml) end it "realises text-transform" do @@ -1843,7 +1840,7 @@ - ForewordForeword + ForewordForeword

    ABCDABC ABC @@ -1857,7 +1854,7 @@ .new(presxml_options) .convert("test", input, true)) .sub(%r{.*}m, ""))) - .to be_equivalent_to (presxml) + .to be_equivalent_to Xml::C14n.format(presxml) end it "label figures embedded within other assets" do @@ -1884,9 +1881,7 @@ Foreword - Foreword -

    diff --git a/spec/isodoc/ref_spec.rb b/spec/isodoc/ref_spec.rb index d0fe9ef4..af38a8b9 100644 --- a/spec/isodoc/ref_spec.rb +++ b/spec/isodoc/ref_spec.rb @@ -137,15 +137,13 @@ en - #{' '} + Table of contents Foreword - Foreword -

    [110] @@ -166,11 +164,11 @@ 1 . + Normative References - Clause @@ -242,9 +240,7 @@ Bibliography - Bibliography - Chemicals for analytical laboratory use. n.p.: n.d. ISBN: ISBN. @@ -600,7 +596,7 @@ INPUT presxml = <<~PRESXML - #{' '} + Table of contents @@ -608,9 +604,7 @@

    [110] @@ -850,11 +842,11 @@ . + Normative References - Clause @@ -908,9 +900,9 @@ NOTE + NOTE - @@ -928,9 +920,7 @@

    This is an annotation of document ISSN.

    NOTE - - - NOTE - - NOTE - - - - - + + + NOTE + + + NOTE + + + +

    This is another annotation of document ISSN.

    @@ -1084,9 +1074,7 @@ Foreword - Foreword -

    [110] @@ -1096,9 +1084,7 @@ Table of contents - Table of contents - @@ -1109,11 +1095,11 @@ 1 . + Normative References - Clause @@ -1197,9 +1183,7 @@ Foreword - Foreword -

    IEC 217 @@ -1230,11 +1214,11 @@ 1 . + Normative References - Clause @@ -1259,9 +1243,7 @@ Foreword - Foreword -

    ISO 712 / IEC 217 @@ -1301,9 +1283,7 @@ Bibliography - Bibliography - Cereals or cereal products. @@ -1360,9 +1340,7 @@ Bibliography - Bibliography - Cereals or cereal products. @@ -1413,9 +1391,7 @@ Bibliography - Bibliography - Cereals or cereal products. @@ -1481,11 +1457,11 @@ 1 . + Normative References - Clause @@ -1603,11 +1579,11 @@ 1 . + Normative References - Clause @@ -1727,11 +1703,11 @@ 1 . + Normative References - Clause @@ -1758,11 +1734,11 @@ . 1 . + Normative 1 - Clause @@ -1786,9 +1762,7 @@ Bibliography - Bibliography -

    Text

    @@ -1806,9 +1780,7 @@ Bibliography 1 - Bibliography 1 - @@ -1907,9 +1879,7 @@ Foreword - Foreword -

    what @@ -1963,11 +1933,11 @@ 1 . + First References - Clause @@ -1981,11 +1951,11 @@ . 1 . + Normative References 1 - Clause @@ -2002,11 +1972,11 @@ . 2 . + Normative References 2 - Clause @@ -2021,24 +1991,18 @@ Bibliography - Bibliography - Bibliography Subsection 1 - Bibliography Subsection 1 - Bibliography Subsection 2 - Bibliography Subsection 2 - @@ -2113,11 +2077,11 @@ 1 . + Normative References 2 - Clause @@ -2156,11 +2120,11 @@ 1 . + Normative References 2 - klaŭzo diff --git a/spec/isodoc/section_spec.rb b/spec/isodoc/section_spec.rb index cc5c3962..3bbdd2d8 100644 --- a/spec/isodoc/section_spec.rb +++ b/spec/isodoc/section_spec.rb @@ -213,312 +213,312 @@ INPUT presxml = <<~OUTPUT - - - - Table of contents - - - - - <strong>Glossary</strong> - - - - - Annex - A - -
    - (normative) - -
    -
    -
    - - Glossary - -
    -
    - - Annex - A - - - - - - A - . - 1 - . - - - - Annex - A - . - 1 - - - Glossary - - - -
    - - - <strong>Glossary</strong> - - - - - Annex - B - -
    - (normative) - -
    -
    -
    - - Glossary - -
    -
    - - Annex - B - - - Term Collection - - - B - . - 1 - . - - - - Term Collection - - - - Annex - B - . - 1 - - - - - B - . - 1 - . - 1 - . - - - - Annex - B - . - 1 - . - 1 - - - Term - - - - - Term Collection 2 - - - B - . - 2 - . - - - - Term Collection 2 - - - - Annex - B - . - 2 - - - - - B - . - 2 - . - 1 - . - - - - Annex - B - . - 2 - . - 1 - - - Term - - - -
    - - - <strong>Glossary</strong> - - - - - Annex - C - -
    - (normative) - -
    -
    -
    - - Glossary - -
    -
    - - Annex - C - - - Term Collection - - - C - . - 1 - . - - - - Term Collection - - - - Annex - C - . - 1 - - - - - C - . - 1 - . - 1 - . - - - - Annex - C - . - 1 - . - 1 - - - Term - - - - - References - - - C - . - 2 - . - - - - References - - - - Annex - C - . - 2 - - -
    - - - <strong>Term Collection</strong> - - - - - Annex - D - -
    - (normative) - -
    -
    -
    - - Term Collection - -
    -
    - - Annex - D - - - - - - D - . - 1 - . - - - - Annex - D - . - 1 - - - Term - - - -
    -
    + + + + Table of contents + + + + + <strong>Glossary</strong> + + + + + Annex + A + + +
    + (normative) + +
    +
    +
    + + Glossary + +
    + + Annex + A + + + + + + A + . + 1 + . + + + + Annex + A + . + 1 + + + Glossary + + + +
    + + + <strong>Glossary</strong> + + + + + Annex + B + + +
    + (normative) + +
    +
    +
    + + Glossary + +
    + + Annex + B + + + Term Collection + + + B + . + 1 + . + + + + + Term Collection + + + Annex + B + . + 1 + + + + + B + . + 1 + . + 1 + . + + + + Annex + B + . + 1 + . + 1 + + + Term + + + + + Term Collection 2 + + + B + . + 2 + . + + + + + Term Collection 2 + + + Annex + B + . + 2 + + + + + B + . + 2 + . + 1 + . + + + + Annex + B + . + 2 + . + 1 + + + Term + + + +
    + + + <strong>Glossary</strong> + + + + + Annex + C + + +
    + (normative) + +
    +
    +
    + + Glossary + +
    + + Annex + C + + + Term Collection + + + C + . + 1 + . + + + + + Term Collection + + + Annex + C + . + 1 + + + + + C + . + 1 + . + 1 + . + + + + Annex + C + . + 1 + . + 1 + + + Term + + + + + References + + + C + . + 2 + . + + + + + References + + + Annex + C + . + 2 + + +
    + + + <strong>Term Collection</strong> + + + + + Annex + D + + +
    + (normative) + +
    +
    +
    + + Term Collection + +
    + + Annex + D + + + + + + D + . + 1 + . + + + + Annex + D + . + 1 + + + Term + + + +
    +
    OUTPUT expect(Xml::C14n.format(strip_guid(IsoDoc::PresentationXMLConvert .new(presxml_options) diff --git a/spec/isodoc/section_title_spec.rb b/spec/isodoc/section_title_spec.rb index f4a186f4..f589ab47 100644 --- a/spec/isodoc/section_title_spec.rb +++ b/spec/isodoc/section_title_spec.rb @@ -119,499 +119,467 @@ presxml = <<~PRESXML - - - - Copyright - - - Copyright - - - - - - - License - - - License - - - - - - - Legal - - - Legal - - - - - - - Feedback - - - Feedback - - - - - - - - Table of contents - - - Abstract - - - Abstract - - - - - Foreword - - - Foreword - - -

    This is a preamble

    -
    - - Introduction - - - Introduction - - - - Introduction Subsection - - - Introduction Subsection - - - - - - Dedication - - - Dedication - - - - - Note to reader - - - Note to reader - - - - - Acknowledgements - - - Acknowledgements - - - -
    - - - - - NOTE - - - - - -

    Initial note

    -
    - - WARNING - - - WARNING - - -

    Initial admonition

    -
    - - Scope - - - 1 - . - - - - Scope - - - - Clause - 1 - -

    Text

    -
    - - Terms, Definitions, Symbols and Abbreviated Terms - - - 3 - . - - - - Terms, Definitions, Symbols and Abbreviated Terms - - - - Clause - 3 - - - Normal Terms - - - 3 - . - 1 - . - - - - Normal Terms - - - - Clause - 3 - . - 1 - - - - - 3 - . - 1 - . - 1 - . - - - - Clause - 3 - . - 1 - . - 1 - - - Term2 - - - - - Symbols - - - 3 - . - 2 - . - - - - Symbols - - - - Clause - 3 - . - 2 - -
    -
    Symbol
    -
    Definition
    -
    -
    -
    - - Symbols and abbreviated terms - - - 4 - . - - - - Symbols and abbreviated terms - - - - Clause - 4 - -
    -
    Symbol
    -
    Definition
    -
    -
    - - Clause 4 - - - 5 - . - - - - Clause 4 - - - - Clause - 5 - - - Introduction - - - 5 - . - 1 - . - - - - Introduction - - - - Clause - 5 - . - 1 - - - - Clause 4.2 - - - 5 - . - 2 - . - - - - Clause 4.2 - - - - Clause - 5 - . - 2 - - - - - - 5 - . - 3 - . - - - - Clause - 5 - . - 3 - - - - - Normative References - - - 2 - . - - - - Normative References - - - - Clause - 2 - - -
    - - - <strong>Annex</strong> - - - - - Annex - A - -
    - (normative) - -
    -
    -
    - - Annex - -
    -
    - - Annex - A - - - Annex A.1 - - - A - . - 1 - . - - - - Annex A.1 - - - - Annex - A - . - 1 - - - Annex A.1a - - - A - . - 1 - . - 1 - . - - - - Annex A.1a - - - - Annex - A - . - 1 - . - 1 - - - - Annex Bibliography - - - A - . - 1 - . - 2 - . - - - - Annex Bibliography - - - - Annex - A - . - 1 - . - 2 - - - -
    - - - - - Annex - B - -
    - (normative) -
    -
    - - Annex - B - -
    - - - Bibliography - - - Bibliography - - - - Bibliography Subsection - - - Bibliography Subsection - - - - - - - - Postface 1 - - - Postface 1 - - - - - Postface 2 - - - Postface 2 - - - - - + + + + Copyright + + Copyright + + + + + + License + + License + + + + + + Legal + + Legal + + + + + + Feedback + + Feedback + + + + + + + Table of contents + + + Abstract + + Abstract + + + + Foreword + + Foreword + +

    This is a preamble

    +
    + + Introduction + + Introduction + + + Introduction Subsection + + Introduction Subsection + + + + + Dedication + + Dedication + + + + Note to reader + + Note to reader + + + + Acknowledgements + + Acknowledgements + + +
    + + + + + NOTE + + + + + +

    Initial note

    +
    + + WARNING + + WARNING + +

    Initial admonition

    +
    + + Scope + + + 1 + . + + + + + Scope + + + Clause + 1 + +

    Text

    +
    + + Terms, Definitions, Symbols and Abbreviated Terms + + + 3 + . + + + + + Terms, Definitions, Symbols and Abbreviated Terms + + + Clause + 3 + + + Normal Terms + + + 3 + . + 1 + . + + + + + Normal Terms + + + Clause + 3 + . + 1 + + + + + 3 + . + 1 + . + 1 + . + + + + Clause + 3 + . + 1 + . + 1 + + + Term2 + + + + + Symbols + + + 3 + . + 2 + . + + + + + Symbols + + + Clause + 3 + . + 2 + +
    +
    Symbol
    +
    Definition
    +
    +
    +
    + + Symbols and abbreviated terms + + + 4 + . + + + + + Symbols and abbreviated terms + + + Clause + 4 + +
    +
    Symbol
    +
    Definition
    +
    +
    + + Clause 4 + + + 5 + . + + + + + Clause 4 + + + Clause + 5 + + + Introduction + + + 5 + . + 1 + . + + + + + Introduction + + + Clause + 5 + . + 1 + + + + Clause 4.2 + + + 5 + . + 2 + . + + + + + Clause 4.2 + + + Clause + 5 + . + 2 + + + + + + 5 + . + 3 + . + + + + Clause + 5 + . + 3 + + + + + Normative References + + + 2 + . + + + + + Normative References + + + Clause + 2 + + +
    + + + <strong>Annex</strong> + + + + + Annex + A + + +
    + (normative) + +
    +
    +
    + + Annex + +
    + + Annex + A + + + Annex A.1 + + + A + . + 1 + . + + + + + Annex A.1 + + + Annex + A + . + 1 + + + Annex A.1a + + + A + . + 1 + . + 1 + . + + + + + Annex A.1a + + + Annex + A + . + 1 + . + 1 + + + + Annex Bibliography + + + A + . + 1 + . + 2 + . + + + + + Annex Bibliography + + + Annex + A + . + 1 + . + 2 + + + +
    + + + + + Annex + B + + +
    + (normative) +
    + + Annex + B + +
    + + + Bibliography + + Bibliography + + + Bibliography Subsection + + Bibliography Subsection + + + + + + + Postface 1 + + Postface 1 + + + + Postface 2 + + Postface 2 + + + + PRESXML html = <<~"OUTPUT" @@ -1612,232 +1580,198 @@
    Symbol
    -
    Definition
    -
    -
    - - -
    -
    Symbol
    -
    Definition
    -
    -
    - Clause 4 - Introduction - - - Clause 4.2 - - - - - - - Annex - - Annex A.1 - - Annex A.1a - - - - Normative References - - Bibliography - - Bibliography Subsection - - - - - INPUT - output = <<~OUTPUT - - - - Table of contents - - - Foreword - - - Foreword - - -

    This is a preamble

    -
    - - Introduction - - - Introduction - - - - Introduction Subsection - - - Introduction Subsection - - - - -
    - - - Scope - - - Scope - - -

    Text

    -
    - - Terms, Definitions, Symbols and Abbreviated Terms - - - Terms, Definitions, Symbols and Abbreviated Terms - - - - Normal Terms - - - Normal Terms - - - - - - 3 - . - 1 - . - 1 - . - - - - Clause - 3 - . - 1 - . - 1 - - - Term2 - - - - - Symbols - - - Symbols - - -
    -
    Symbol
    -
    Definition
    -
    -
    -
    - - Symbols - - - Symbols - - -
    -
    Symbol
    -
    Definition
    -
    -
    - - Clause 4 - - - Clause 4 - - - - Introduction - - - Introduction - - - - - Clause 4.2 - - - Clause 4.2 - - - - +
    Definition
    + + +
    + +
    +
    Symbol
    +
    Definition
    +
    +
    + Clause 4 + Introduction + + + Clause 4.2 + + + -
    - - Normative References - - - Normative References - - - -
    - - - <strong>Annex</strong> - - - - - Annex - - - - - Annex A.1 - - - Annex A.1 - - - - Annex A.1a - - - Annex A.1a - - - - - - - - Bibliography - - - Bibliography - - - - Bibliography Subsection - - - Bibliography Subsection - - - - - + + + Annex + + Annex A.1 + + Annex A.1a + + + + Normative References + + Bibliography + + Bibliography Subsection + + +
    + INPUT + output = <<~OUTPUT + + + + Table of contents + + + Foreword + + Foreword + +

    This is a preamble

    +
    + + Introduction + + Introduction + + + Introduction Subsection + + Introduction Subsection + + + +
    + + + Scope + + Scope + +

    Text

    +
    + + Terms, Definitions, Symbols and Abbreviated Terms + + Terms, Definitions, Symbols and Abbreviated Terms + + + Normal Terms + + Normal Terms + + + + + 3 + . + 1 + . + 1 + . + + + + Clause + 3 + . + 1 + . + 1 + + + Term2 + + + + + Symbols + + Symbols + +
    +
    Symbol
    +
    Definition
    +
    +
    +
    + + Symbols + + Symbols + +
    +
    Symbol
    +
    Definition
    +
    +
    + + Clause 4 + + Clause 4 + + + Introduction + + Introduction + + + + Clause 4.2 + + Clause 4.2 + + + + + + + Normative References + + Normative References + + +
    + + + <strong>Annex</strong> + + + + Annex + + + + Annex A.1 + + Annex A.1 + + + Annex A.1a + + Annex A.1a + + + + + + + Bibliography + + Bibliography + + + Bibliography Subsection + + Bibliography Subsection + + + + +
    OUTPUT expect(Xml::C14n.format(strip_guid(IsoDoc::PresentationXMLConvert .new({ suppressheadingnumbers: true } @@ -1908,173 +1842,145 @@ INPUT output = <<~OUTPUT - - - - Table of contents - - - - - Scope - - - Scope - - -

    Text

    -
    - - Terms, Definitions, Symbols and Abbreviated Terms - - - Terms, Definitions, Symbols and Abbreviated Terms - - - - Normal Terms - - - Normal Terms - - - - - Term2 - - - - - Symbols - - - Symbols - - -
    -
    Symbol
    -
    Definition
    -
    -
    -
    - - Symbols - - - Symbols - - -
    -
    Symbol
    -
    Definition
    -
    -
    - - Clause 4 - - - Clause 4 - - - - Introduction - - - Introduction - - - - - Clause 4.2 - - - Clause 4.2 - - - - - - - - 1 - . - - - - Clause - 1 - - - - - - - - 2 - . - - - - Clause - 2 - - - - Normative References - - - Normative References - - - -
    - - - <strong>Annex</strong> - - - - - Annex - - - - - Annex A.1 - - - Annex A.1 - - - - Annex A.1a - - - Annex A.1a - - - - - - - - Bibliography - - - Bibliography - - - - Bibliography Subsection - - - Bibliography Subsection - - - - - -
    + + + + Table of contents + + + + + Scope + + Scope + +

    Text

    +
    + + Terms, Definitions, Symbols and Abbreviated Terms + + Terms, Definitions, Symbols and Abbreviated Terms + + + Normal Terms + + Normal Terms + + + + Term2 + + + + + Symbols + + Symbols + +
    +
    Symbol
    +
    Definition
    +
    +
    +
    + + Symbols + + Symbols + +
    +
    Symbol
    +
    Definition
    +
    +
    + + Clause 4 + + Clause 4 + + + Introduction + + Introduction + + + + Clause 4.2 + + Clause 4.2 + + + + + + + 1 + . + + + + Clause + 1 + + + + + + + + 2 + . + + + + Clause + 2 + + + + Normative References + + Normative References + + +
    + + + <strong>Annex</strong> + + + + Annex + + + + Annex A.1 + + Annex A.1 + + + Annex A.1a + + Annex A.1a + + + + + + + Bibliography + + Bibliography + + + Bibliography Subsection + + Bibliography Subsection + + + + +
    OUTPUT expect(Xml::C14n.format(strip_guid(IsoDoc::PresentationXMLConvert .new(presxml_options) @@ -2129,25 +2035,19 @@ Introduction - Introduction -

    A

    Introduction Subsection - Introduction Subsection -

    B

    Introduction Sub-subsection - Introduction Sub-subsection -

    C

    @@ -2161,11 +2061,11 @@ 1 . + Introduction - Clause @@ -2180,11 +2080,11 @@ . 1 . + Introduction Subsection - Clause @@ -2203,11 +2103,11 @@ . 1 . + Introduction Sub-subsection - Clause @@ -2228,11 +2128,11 @@ 2 . + Clause 2 - Clause @@ -2338,16 +2238,12 @@ Introduction - Introduction - Introduction Subsection - Introduction Subsection - @@ -2391,11 +2287,11 @@ 1 . + Clause 4 - Clause @@ -2409,11 +2305,11 @@ . 1 . + Introduction - Clause @@ -2430,11 +2326,11 @@ . 2 . + Clause 4.2 - Clause @@ -2504,24 +2400,18 @@ Clause 4 - Clause 4 - Introduction - Introduction - Clause 4.2 - Clause 4.2 - @@ -2559,9 +2449,7 @@ Intro - Intro - diff --git a/spec/isodoc/sourcecode_spec.rb b/spec/isodoc/sourcecode_spec.rb index 06174835..170e8998 100644 --- a/spec/isodoc/sourcecode_spec.rb +++ b/spec/isodoc/sourcecode_spec.rb @@ -21,9 +21,7 @@ Foreword - Foreword - @@ -34,12 +32,12 @@ Figure 1 +  — Ruby code - Figure @@ -199,9 +197,7 @@ Foreword - Foreword - @@ -212,12 +208,12 @@ Figure 1 +  — Ruby code - Figure @@ -229,9 +225,7 @@ More - More -
    @@ -257,9 +251,7 @@ More - More -
    @@ -406,9 +398,7 @@ user-css - user-css - .green { background-color: green } @@ -483,17 +473,15 @@ Foreword - Foreword - XML code Figure 1 +  — XML code - Figure 1 @@ -504,9 +492,9 @@ Figure 2 +  — XML code - Figure @@ -585,9 +573,7 @@ Foreword - Foreword - @@ -606,9 +592,7 @@ end
    Key - Key -
    1

    This is one callout

    2

    This is another callout

    3

    This is yet another callout

    @@ -768,9 +752,7 @@ Foreword - Foreword - @@ -822,9 +804,7 @@
    Key - Key -
    1
    @@ -998,9 +978,7 @@ Foreword - Foreword - @@ -1089,9 +1067,7 @@
    Key - Key -
    1
    @@ -1136,9 +1112,7 @@ Foreword - Foreword -
    Label @@ -1146,9 +1120,9 @@ Figure 1 +  — Label - Figure diff --git a/spec/isodoc/table_spec.rb b/spec/isodoc/table_spec.rb index 7db98413..3f38d10f 100644 --- a/spec/isodoc/table_spec.rb +++ b/spec/isodoc/table_spec.rb @@ -111,208 +111,214 @@ INPUT presxml = <<~OUTPUT - - - - Table of contents - - - Foreword - - - Foreword - - -
    - - Repeatability and reproducibility of - husked - rice yield - -

    X

    -
    -
    - - - Table - 1 -  — - - Repeatability and reproducibility of - husked - rice yield - -

    X

    -
    -
    -
    -
    - - Table - 1 - - - - - - - - - - - - - - - - -
    DescriptionRice sample
    Arborio - Drago - -

    Parboiled rice.

    -
    -
    - Balilla - -

    Parboiled rice.

    + + + + Table of contents + + + Foreword + + Foreword + + + + Repeatability and reproducibility of + husked + rice yield + +

    X

    +
    +
    + + + Table + 1 + +  — + + Repeatability and reproducibility of + husked + rice yield + +

    X

    - -
    - + + + + Table + 1 + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + +
    - Key - - - Key - - -
    Drago
    -
    A type of rice
    + Key + + Key + +
    Drago
    +
    A type of rice
    - [SOURCE: ISO 712, Section 1 - — with adjustments ; ISO 712, Section 2] + + [SOURCE: + ISO 712, Section 1 + — with adjustments ; + ISO 712, Section 2 + ] + - - - NOTE - - - - - -

    This is a table about rice

    + + + NOTE + + + + + +

    This is a table about rice

    -
    Thaibonnet
    DescriptionRice sample
    Arborio + Drago + +

    Parboiled rice.

    +
    +
    + Balilla + +

    Parboiled rice.

    +
    +
    Thaibonnet
    Number of laboratories retained after eliminating outliers13111313
    Mean value, g/100 g81,282,081,877,7
    Number of laboratories retained after eliminating outliers13111313
    Mean value, g/100 g81,282,081,877,7
    - Reproducibility limit, - R - (= 2,83 - s_R - ) - 2,890,572,26 -
    -
    6,06
    -
    Definition
    -
    -
    + Reproducibility limit, + R + (= 2,83 + s_R + ) + 2,890,572,26 +
    +
    6,06
    +
    Definition
    +
    +
    - +
    + - - - + + + -
    A
    A
    -
    -
    - - - Normative References - - - 1 - . - - - - Normative References - - - - Clause - 1 - - - International Organization for Standardization. Cereals and cereal products. - ISO 712 - ISO 712 - ISO 712, - - - - - - - - - Annex - A - -
    - (informative) -
    -
    - - Annex - A - - - - - Table - A - . - 1 - - - - Table - A - . - 1 - - - - - - -
    A
    -
    -
    +
    + + + + + Normative References + + + 1 + . + + + + + Normative References + + + Clause + 1 + + + + International Organization for Standardization. + Cereals and cereal products + . + + ISO 712 + ISO 712 + ISO 712, + + + + + + + + Annex + A + + +
    + (informative) +
    + + Annex + A + + + + + Table + A + . + 1 + + + + Table + A + . + 1 + + + + + + +
    A
    +
    + + + OUTPUT html = <<~OUTPUT diff --git a/spec/isodoc/terms_spec.rb b/spec/isodoc/terms_spec.rb index be7a127a..24dc4c1c 100644 --- a/spec/isodoc/terms_spec.rb +++ b/spec/isodoc/terms_spec.rb @@ -28,11 +28,11 @@ 1 . + Terms, Definitions, Symbols and Abbreviated Terms - Clause @@ -170,11 +170,11 @@ 1 . + Terms and Definitions - Clause @@ -522,11 +522,11 @@ 1 . + Terms and Definitions - Clause @@ -668,11 +668,11 @@ 1 . + Terms and Definitions - Clause @@ -842,11 +842,11 @@ 1 . + Terms and Definitions - Clause @@ -917,11 +917,11 @@ 1 . + Terms and Definitions - Clause @@ -1074,11 +1074,11 @@ 1 . + Terms and definitions - Clause @@ -1281,11 +1281,11 @@ 1 . + Terms and definitions - Clause @@ -1424,11 +1424,11 @@ 1 . + Terms and Definitions - Clause @@ -1498,11 +1498,11 @@ 1 . + Terms and Definitions - Klausel @@ -1592,11 +1592,11 @@ 1 . + Terms and Definitions - Clause diff --git a/spec/isodoc/xref_format_spec.rb b/spec/isodoc/xref_format_spec.rb index 7dbdb3d6..d3b331bf 100644 --- a/spec/isodoc/xref_format_spec.rb +++ b/spec/isodoc/xref_format_spec.rb @@ -55,9 +55,7 @@ Foreword - Foreword -

    a#b diff --git a/spec/isodoc/xref_lists_spec.rb b/spec/isodoc/xref_lists_spec.rb index 38d07b50..9e1dd9f7 100644 --- a/spec/isodoc/xref_lists_spec.rb +++ b/spec/isodoc/xref_lists_spec.rb @@ -73,9 +73,7 @@ Foreword - Foreword -

    @@ -233,9 +231,7 @@ Foreword - Foreword -

    @@ -347,9 +343,7 @@ まえがき - まえがき -

    @@ -535,9 +529,7 @@ Foreword - Foreword -

    @@ -682,9 +674,7 @@ まえがき - まえがき -

    @@ -924,9 +914,7 @@ Foreword - Foreword -

    @@ -1076,9 +1064,7 @@ Foreword - Foreword -

    @@ -1216,9 +1202,7 @@ Foreword - Foreword -

    diff --git a/spec/isodoc/xref_numbering_spec.rb b/spec/isodoc/xref_numbering_spec.rb index 363f98c1..68916486 100644 --- a/spec/isodoc/xref_numbering_spec.rb +++ b/spec/isodoc/xref_numbering_spec.rb @@ -49,9 +49,7 @@ Foreword - Foreword -

    @@ -266,9 +264,7 @@ Foreword - Foreword -

    @@ -545,9 +541,7 @@ Foreword - Foreword -

    @@ -767,9 +761,7 @@ Foreword - Foreword - diff --git a/spec/isodoc/xref_spec.rb b/spec/isodoc/xref_spec.rb index d55396dd..5a2637dc 100644 --- a/spec/isodoc/xref_spec.rb +++ b/spec/isodoc/xref_spec.rb @@ -109,9 +109,7 @@ Foreword - Foreword -

    @@ -268,9 +266,7 @@ Foreword - Foreword -

    @@ -354,9 +350,7 @@ まえがき - まえがき -

    @@ -536,9 +530,7 @@ Foreword - Foreword -

    @@ -709,9 +701,7 @@ Foreword - Foreword -

    @@ -856,9 +846,7 @@ Foreword - Foreword -

    @@ -1002,9 +990,7 @@ Foreword - Foreword -

    @@ -1222,9 +1208,7 @@ Foreword - Foreword -

    @@ -1396,9 +1380,7 @@ Foreword - Foreword -

    @@ -1535,9 +1517,7 @@ Foreword - Foreword -

    @@ -1666,9 +1646,7 @@ Foreword - Foreword -

    @@ -1791,9 +1769,7 @@ Foreword - Foreword -

    @@ -2053,9 +2029,7 @@ Foreword - Foreword -

    @@ -2146,9 +2120,7 @@ Foreword - Foreword -

    @@ -2255,9 +2227,7 @@ Foreword - Foreword -

    @@ -2336,9 +2306,7 @@ Foreword - Foreword -

    @@ -2411,9 +2379,7 @@ Foreword - Foreword -

    @@ -2557,9 +2523,7 @@ Foreword - Foreword -

    This is a preamble @@ -2684,9 +2648,7 @@ Foreword - Foreword -

    This is a preamble @@ -2908,9 +2870,7 @@ Foreword - Foreword -

    This is a preamble @@ -3062,9 +3022,7 @@ Foreword - Foreword -