diff --git a/lib/isodoc/function/section_titles.rb b/lib/isodoc/function/section_titles.rb index 081651d4..a6d6ebe4 100644 --- a/lib/isodoc/function/section_titles.rb +++ b/lib/isodoc/function/section_titles.rb @@ -1,8 +1,19 @@ module IsoDoc module Function module Section + # Optional per-caption-type delimiter override from i18n: a + # +_delimiter+ key, falling back to a shared +caption_delimiter+ + # key, falling back to the hardcoded default. Uses +@i18n.get+ (hash + # lookup, nil for absent keys) rather than +@i18n.+ (which is only + # defined for present keys). The keys are absent from the base i18n YAML, + # so default behaviour is unchanged unless a flavour or document sets them. + def i18n_delim(type, default) + @i18n&.get&.dig("#{type}_delimiter") || + @i18n&.get&.dig("caption_delimiter") || default + end + def clausedelim - "." + i18n_delim("clause", ".") end def clausedelimspace(_node, out) diff --git a/lib/isodoc/presentation_function/annex.rb b/lib/isodoc/presentation_function/annex.rb index 6522545e..118ef4be 100644 --- a/lib/isodoc/presentation_function/annex.rb +++ b/lib/isodoc/presentation_function/annex.rb @@ -91,7 +91,7 @@ def annex_delim_override(elem) end def annex_delim(_elem) - "

" + i18n_delim("annex", "

") end end end diff --git a/lib/isodoc/presentation_function/block.rb b/lib/isodoc/presentation_function/block.rb index 0eee0319..29aa5561 100644 --- a/lib/isodoc/presentation_function/block.rb +++ b/lib/isodoc/presentation_function/block.rb @@ -46,7 +46,8 @@ def example1(elem) n = @xrefs.get[elem["id"]] || @xrefs.get[elem["original-id"]] lbl = labelled_autonum(@i18n.example, elem["id"] || elem["original-id"], n&.dig(:label)) - prefix_name(elem, { caption: block_delim }, lbl, "name") + prefix_name(elem, { caption: i18n_delim("example", block_delim) }, lbl, + "name") end def note(docxml) @@ -54,7 +55,7 @@ def note(docxml) end def note_delim(_elem) - "" + i18n_delim("note", "") end def note1(elem) @@ -88,7 +89,8 @@ def admonition1(elem) def admonition_options(elem) options = { label: admonition_delim(elem) } - elem["type"] == "box" and options = { caption: block_delim } + elem["type"] == "box" and + options = { caption: i18n_delim("admonition", block_delim) } options end @@ -119,7 +121,7 @@ def admonition_icon(elem) def admonition_delim(elem) if elem["type"] == "box" - block_delim + i18n_delim("admonition", block_delim) else "" end @@ -157,7 +159,7 @@ def table_css(elem) end def table_delim - block_delim + i18n_delim("table", block_delim) end def table_long_strings_cleanup(docxml) diff --git a/lib/isodoc/presentation_function/image.rb b/lib/isodoc/presentation_function/image.rb index def57cf7..2884c92f 100644 --- a/lib/isodoc/presentation_function/image.rb +++ b/lib/isodoc/presentation_function/image.rb @@ -54,12 +54,11 @@ def svg_extract(elem) end def subfigure_delim - "" - # ")" + i18n_delim("subfigure", "") end def figure_delim(_elem) - block_delim + i18n_delim("figure", block_delim) end def figure_name(elem) diff --git a/lib/isodoc/presentation_function/section.rb b/lib/isodoc/presentation_function/section.rb index e36657af..bece482f 100644 --- a/lib/isodoc/presentation_function/section.rb +++ b/lib/isodoc/presentation_function/section.rb @@ -34,7 +34,7 @@ def numbered_clause_invalid_context?(elem) def clausedelim ret = super (ret && !ret.empty?) or return ret - "#{ret}" + "#{ret}" end def clause1(elem) diff --git a/lib/isodoc/presentation_function/sourcecode.rb b/lib/isodoc/presentation_function/sourcecode.rb index 8f6f6cb8..32a6f629 100644 --- a/lib/isodoc/presentation_function/sourcecode.rb +++ b/lib/isodoc/presentation_function/sourcecode.rb @@ -185,7 +185,8 @@ def source_label(elem) lbl = @xrefs.anchor(elem["id"], :label, false) s = labelled_autonum(lower2cap(@i18n.figure), elem["id"], lbl)&.strip end - prefix_name(elem, { caption: block_delim }, s, "name") + prefix_name(elem, { caption: i18n_delim("sourcecode", block_delim) }, s, + "name") end end end diff --git a/lib/isodoc/presentation_function/terms.rb b/lib/isodoc/presentation_function/terms.rb index d9a31d40..5c3fabcc 100644 --- a/lib/isodoc/presentation_function/terms.rb +++ b/lib/isodoc/presentation_function/terms.rb @@ -38,7 +38,7 @@ def termnote(docxml) end def termnote_delim(_elem, lbl) - l10n(": ", { prev: lbl }) + l10n(i18n_delim("termnote", ": "), { prev: lbl }) end def termnote1(elem) diff --git a/spec/isodoc/amend_spec.rb b/spec/isodoc/amend_spec.rb index d4cd61a3..cc159922 100644 --- a/spec/isodoc/amend_spec.rb +++ b/spec/isodoc/amend_spec.rb @@ -111,7 +111,7 @@ 1 - . + . @@ -278,7 +278,7 @@ OUTPUT html = <<~OUTPUT
-

1.\u00a0 Change Clause

+

1.\u00a0 Change Clause

This table contains information on polygon cells which are not @@ -444,7 +444,7 @@ 1 - . + . @@ -553,7 +553,7 @@

3.1.2.14 - . + . @@ -620,7 +620,7 @@

3.1.2.15 - . + . @@ -638,7 +638,7 @@ 3.1.2.15 . 1 - . + . @@ -734,7 +734,7 @@ INPUT html = <<~OUTPUT

-

1.\u00a0 Change Clause

+

1.\u00a0 Change Clause

Add the following terminological entries after 3.1.2.13:

@@ -744,7 +744,7 @@

- 3.1.2.14.\u00a0 + 3.1.2.14.\u00a0
canonical form

@@ -771,10 +771,10 @@
-

3.1.2.15.\u00a0 container

+

3.1.2.15.\u00a0 container

This is a container of a subclause.

-

3.1.2.15.1.\u00a0 non-canonical form

+

3.1.2.15.1.\u00a0 non-canonical form

date and time expression where all its time scale components are unnormalised @@ -924,7 +924,7 @@

3.1.2.15 - . + . @@ -942,7 +942,7 @@ 3.1.2.15 . 1 - . + . diff --git a/spec/isodoc/blocks_spec.rb b/spec/isodoc/blocks_spec.rb index 437e8dd5..feeec849 100644 --- a/spec/isodoc/blocks_spec.rb +++ b/spec/isodoc/blocks_spec.rb @@ -937,7 +937,7 @@ 1 - . + . @@ -955,7 +955,7 @@ 1 . 1 - . + . @@ -977,7 +977,7 @@ 1 . 1 - . + . @@ -1002,7 +1002,7 @@ 1 . 2 - . + . @@ -1026,7 +1026,7 @@ 1 . 2 - . + . @@ -1048,7 +1048,7 @@ 2 . 1 - . + . @@ -1071,7 +1071,7 @@ 2 - . + . @@ -1300,25 +1300,25 @@ #{HTML_HDR}

Document title

-

1.  Clause 1

+

1.  Clause 1

-

1.1.  Clause 1A

+

1.1.  Clause 1A

-

1.1.1.  Clause 1Aa

+

1.1.1.  Clause 1Aa

-

1.1.2.  Clause 1Ab

+

1.1.2.  Clause 1Ab

-

1.2.  Clause 1B

+

1.2.  Clause 1B

-

1.2.1.  Clause 1Ba

+

1.2.1.  Clause 1Ba

-

2.  Clause 2

+

2.  Clause 2

And introducing:

diff --git a/spec/isodoc/concept_spec.rb b/spec/isodoc/concept_spec.rb index 5f6bb190..f0339345 100644 --- a/spec/isodoc/concept_spec.rb +++ b/spec/isodoc/concept_spec.rb @@ -1045,7 +1045,7 @@ 1 - . + . @@ -1062,7 +1062,7 @@ 1 . 1 - . + . diff --git a/spec/isodoc/eref_spec.rb b/spec/isodoc/eref_spec.rb index cdcab412..aa4764a4 100644 --- a/spec/isodoc/eref_spec.rb +++ b/spec/isodoc/eref_spec.rb @@ -249,7 +249,7 @@

-

1.\u00a0 Normative References

+

1.\u00a0 Normative References

ISO\u00a0712, Cereals and cereal products

@@ -451,7 +451,7 @@

-

1.\u00a0 Normative References

+

1.\u00a0 Normative References

1, ALUFFI, Paolo, David ANDERSON, Milena HERING, Mircea MUSTAŢĂ and Sam PAYNE (eds.). Facets of Algebraic Geometry: A Collection in Honor of William Fulton's 80th Birthday diff --git a/spec/isodoc/figures_spec.rb b/spec/isodoc/figures_spec.rb index debb3085..12d6007f 100644 --- a/spec/isodoc/figures_spec.rb +++ b/spec/isodoc/figures_spec.rb @@ -239,7 +239,7 @@ 1 - . + . @@ -406,7 +406,7 @@

-

1.  Normative References

+

1.  Normative References

ISO 712, International Organization for Standardization. Cereals and cereal products.


@@ -546,7 +546,7 @@

-

1.\u00a0 Normative References

+

1.\u00a0 Normative References

ISO\u00a0712, International Organization for Standardization. Cereals and cereal products diff --git a/spec/isodoc/floating_title_spec.rb b/spec/isodoc/floating_title_spec.rb index 274af586..5ff74722 100644 --- a/spec/isodoc/floating_title_spec.rb +++ b/spec/isodoc/floating_title_spec.rb @@ -85,7 +85,7 @@ 1 - . + . @@ -107,7 +107,7 @@ 1 . 1 - . + . @@ -133,7 +133,7 @@ 1 . 1 - . + . @@ -164,7 +164,7 @@ 2 - . + . @@ -197,20 +197,20 @@

-

1.\u00a0 Introduction

+

1.\u00a0 Introduction

A

-

1.1.\u00a0 Introduction Subsection

+

1.1.\u00a0 Introduction Subsection

B

-

1.1.1.\u00a0 Introduction Sub-subsection

+

1.1.1.\u00a0 Introduction Sub-subsection

C

D

-

2.\u00a0 Clause 2

+

2.\u00a0 Clause 2

@@ -259,21 +259,21 @@
-

1.\u00a0 Introduction

+

1.\u00a0 Introduction

A

-

1.1.\u00a0 Introduction Subsection

+

1.1.\u00a0 Introduction Subsection

B

diff --git a/spec/isodoc/footnotes_spec.rb b/spec/isodoc/footnotes_spec.rb index 93e4d4aa..c595094c 100644 --- a/spec/isodoc/footnotes_spec.rb +++ b/spec/isodoc/footnotes_spec.rb @@ -148,7 +148,7 @@ 2 - . + . @@ -195,7 +195,7 @@ 1 - . + . @@ -370,7 +370,7 @@

B.23

-

1.\u00a0 Normative References

+

1.\u00a0 Normative References

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

ISO\u00a0712, International Organization for Standardization. @@ -384,7 +384,7 @@

-

2.

+

2.

5 @@ -450,12 +450,12 @@

B. NOTEREF _Ref \\f \\h2 NOTEREF _Ref \\f \\h3

-

1.  Normative References

+

1.  Normative References

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

ISO 712, International Organization for Standardization. Cereals and cereal products4.

-

2.\u00a0 Normative References

+

2.\u00a0 Normative References

ISO\u00a0712, Cereals and cereal products .

-

3.\u00a0 Terms, definitions, symbols and abbreviated terms

+

3.\u00a0 Terms, definitions, symbols and abbreviated terms

-

3.1.\u00a0 Normal Terms

-

3.1.1.

+

3.1.\u00a0 Normal Terms

+

3.1.1.

Term2

-

3.2.\u00a0 Symbols

+

3.2.\u00a0 Symbols

Symbol

Definition
-

4.\u00a0 Symbols

+

4.\u00a0 Symbols

@@ -558,9 +558,9 @@
-

5.\u00a0 Clause 4

+

5.\u00a0 Clause 4

-

5.1.\u00a0 Introduction

+

5.1.\u00a0 Introduction

NOTE\u00a0 @@ -568,7 +568,7 @@

-

5.2.\u00a0 Clause 4.2

+

5.2.\u00a0 Clause 4.2


@@ -576,9 +576,9 @@

Annex A
(normative)

Annex

-

A.1.\u00a0 Annex A.1

+

A.1.\u00a0 Annex A.1

-

A.1.1.\u00a0 Annex A.1a

+

A.1.1.\u00a0 Annex A.1a

@@ -746,7 +746,7 @@ 1 - . + . @@ -774,7 +774,7 @@ 3 - . + . @@ -792,7 +792,7 @@ 3 . 1 - . + . @@ -813,7 +813,7 @@ 1 . 1 - . + . @@ -847,7 +847,7 @@ 3 . 2 - . + . @@ -871,7 +871,7 @@ 4 - . + . @@ -892,7 +892,7 @@ 5 - . + . @@ -910,7 +910,7 @@ 5 . 1 - . + . @@ -954,7 +954,7 @@ 5 . 2 - . + . @@ -974,7 +974,7 @@ 2 - . + . @@ -1043,7 +1043,7 @@ A . 1 - . + . @@ -1065,7 +1065,7 @@ 1 . 1 - . + . @@ -1183,7 +1183,7 @@ 1 - . + . @@ -1211,7 +1211,7 @@ 3 - . + . @@ -1229,7 +1229,7 @@ 3 . 1 - . + . @@ -1250,7 +1250,7 @@ 1 . 1 - . + . @@ -1284,7 +1284,7 @@ 3 . 2 - . + . @@ -1308,7 +1308,7 @@ 4 - . + . @@ -1329,7 +1329,7 @@ 5 - . + . @@ -1347,7 +1347,7 @@ 5 . 1 - . + . @@ -1391,7 +1391,7 @@ 5 . 2 - . + . @@ -1411,7 +1411,7 @@ 2 - . + . @@ -1472,7 +1472,7 @@ A . 1 - . + . @@ -1494,7 +1494,7 @@ 1 . 1 - . + . @@ -1554,31 +1554,31 @@
-

1.\u00a0 Scope

+

1.\u00a0 Scope

ISO\u00a0712, Tableau 1–1

-

2.\u00a0 Normative References

+

2.\u00a0 Normative References

ISO\u00a0712, Cereals and cereal products .

-

3.\u00a0 Terms, definitions, symbols and abbreviated terms

+

3.\u00a0 Terms, definitions, symbols and abbreviated terms

-

3.1.\u00a0 Normal Terms

-

3.1.1.

+

3.1.\u00a0 Normal Terms

+

3.1.1.

Term2

-

3.2.\u00a0 Symboles

+

3.2.\u00a0 Symboles

Symbol

Definition
-

4.\u00a0 Symboles

+

4.\u00a0 Symboles

@@ -1589,9 +1589,9 @@
-

5.\u00a0 Clause 4

+

5.\u00a0 Clause 4

-

5.1.\u00a0 Introduction

+

5.1.\u00a0 Introduction

NOTE\u00a0 @@ -1599,7 +1599,7 @@

-

5.2.\u00a0 Clause 4.2

+

5.2.\u00a0 Clause 4.2


@@ -1607,9 +1607,9 @@

Annexe A
(normative)

Annex

-

A.1.\u00a0 Annex A.1

+

A.1.\u00a0 Annex A.1

-

A.1.1.\u00a0 Annex A.1a

+

A.1.1.\u00a0 Annex A.1a

@@ -1712,7 +1712,7 @@ 1 - . + . @@ -1740,7 +1740,7 @@ 3 - . + . @@ -1758,7 +1758,7 @@ 3 . 1 - . + . @@ -1779,7 +1779,7 @@ 1 . 1 - . + . @@ -1813,7 +1813,7 @@ 3 . 2 - . + . @@ -1837,7 +1837,7 @@ 4 - . + . @@ -1858,7 +1858,7 @@ 5 - . + . @@ -1876,7 +1876,7 @@ 5 . 1 - . + . @@ -1920,7 +1920,7 @@ 5 . 2 - . + . @@ -1940,7 +1940,7 @@ 2 - . + . @@ -2009,7 +2009,7 @@ A . 1 - . + . @@ -2031,7 +2031,7 @@ 1 . 1 - . + . @@ -2088,31 +2088,31 @@
-

1.\u3000Scope

+

1.\u3000Scope

ISO\u00a0712, 表1〜1

-

2.\u3000Normative References

+

2.\u3000Normative References

ISO\u00a0712, Cereals and cereal products

-

3.\u3000Terms, definitions, symbols and abbreviated terms

-

3.1.\u3000Normal Terms

+

3.\u3000Terms, definitions, symbols and abbreviated terms

+

3.1.\u3000Normal Terms

-

3.1.1.

+

3.1.1.

Term2

-

3.2.\u3000符号

+

3.2.\u3000符号

Symbol

Definition
-

4.\u3000符号

+

4.\u3000符号

@@ -2123,15 +2123,15 @@
-

5.\u3000Clause 4

-

5.1.\u3000Introduction

+

5.\u3000Clause 4

+

5.1.\u3000Introduction

注\u3000

-

5.2.\u3000Clause 4.2

+

5.2.\u3000Clause 4.2

@@ -2140,9 +2140,9 @@

附件A
(规范性附录)

Annex

-

A.1.\u3000Annex A.1

+

A.1.\u3000Annex A.1

-

A.1.1.\u3000Annex A.1a

+

A.1.1.\u3000Annex A.1a

@@ -2231,7 +2231,7 @@ 1 - . + . @@ -2259,7 +2259,7 @@ 3 - . + . @@ -2277,7 +2277,7 @@ 3 . 1 - . + . @@ -2298,7 +2298,7 @@ 1 . 1 - . + . @@ -2332,7 +2332,7 @@ 3 . 2 - . + . @@ -2356,7 +2356,7 @@ 4 - . + . @@ -2377,7 +2377,7 @@ 5 - . + . @@ -2395,7 +2395,7 @@ 5 . 1 - . + . @@ -2439,7 +2439,7 @@ 5 . 2 - . + . @@ -2459,7 +2459,7 @@ 2 - . + . @@ -2529,7 +2529,7 @@ A . 1 - . + . @@ -2553,7 +2553,7 @@ 1 . 1 - . + . @@ -2630,27 +2630,27 @@
-

1.\u00a0 Scope

+

1.\u00a0 Scope

ISO\u00a0712, Tabelo 1–1

-

2.\u00a0 Normative References

+

2.\u00a0 Normative References

ISO\u00a0712, Cereals and cereal products.

-

3.\u00a0 Terms, definitions, symbols and abbreviated terms

+

3.\u00a0 Terms, definitions, symbols and abbreviated terms

-

3.1.\u00a0 Normal Terms

-

3.1.1.

+

3.1.\u00a0 Normal Terms

+

3.1.1.

Term2

-

3.2.\u00a0 Simboloj kai mallongigitaj terminoj

+

3.2.\u00a0 Simboloj kai mallongigitaj terminoj

@@ -2662,7 +2662,7 @@
-

4.\u00a0 Simboloj kai mallongigitaj terminoj

+

4.\u00a0 Simboloj kai mallongigitaj terminoj

@@ -2673,9 +2673,9 @@
-

5.\u00a0 Clause 4

+

5.\u00a0 Clause 4

-

5.1.\u00a0 Introduction

+

5.1.\u00a0 Introduction

NOTO\u00a0 @@ -2683,7 +2683,7 @@

-

5.2.\u00a0 Clause 4.2

+

5.2.\u00a0 Clause 4.2


@@ -2691,9 +2691,9 @@

Aldono A
(normative)

Annex

-

A.1.\u00a0 Annex A.1

+

A.1.\u00a0 Annex A.1

-

A.1.1.\u00a0 Annex A.1a

+

A.1.1.\u00a0 Annex A.1a

diff --git a/spec/isodoc/lists_spec.rb b/spec/isodoc/lists_spec.rb index a4d922a7..e43d3d59 100644 --- a/spec/isodoc/lists_spec.rb +++ b/spec/isodoc/lists_spec.rb @@ -980,7 +980,7 @@ 1 - . + . @@ -1216,7 +1216,7 @@ html = <<~OUTPUT #{HTML_HDR}
-

1.\u00a0 Clause

+

1.\u00a0 Clause

@@ -1364,7 +1364,7 @@ 1 - . + . diff --git a/spec/isodoc/presentation_xml_ids_spec.rb b/spec/isodoc/presentation_xml_ids_spec.rb index 5d66bc7e..bdcb971d 100644 --- a/spec/isodoc/presentation_xml_ids_spec.rb +++ b/spec/isodoc/presentation_xml_ids_spec.rb @@ -25,7 +25,7 @@ 1 - . + . @@ -37,7 +37,7 @@ 2 - . + . @@ -49,7 +49,7 @@ 3 - . + . @@ -345,7 +345,7 @@ 1 - . + . diff --git a/spec/isodoc/presentation_xml_image_spec.rb b/spec/isodoc/presentation_xml_image_spec.rb index 39c7b9d2..f3a63a25 100644 --- a/spec/isodoc/presentation_xml_image_spec.rb +++ b/spec/isodoc/presentation_xml_image_spec.rb @@ -437,7 +437,7 @@ 1 - . + . diff --git a/spec/isodoc/presentation_xml_maths_spec.rb b/spec/isodoc/presentation_xml_maths_spec.rb index 6ee257fc..fc887ab3 100644 --- a/spec/isodoc/presentation_xml_maths_spec.rb +++ b/spec/isodoc/presentation_xml_maths_spec.rb @@ -151,7 +151,7 @@ 1 - . + . @@ -215,7 +215,7 @@ html = <<~OUTPUT #{HTML_HDR}
-

1.

+

1.

x=y\u00a0 (1)

@@ -235,7 +235,7 @@

-

1.

+

1.

x=y\u00a0 (1)

diff --git a/spec/isodoc/presentation_xml_spec.rb b/spec/isodoc/presentation_xml_spec.rb index 0c05e0d3..22b654eb 100644 --- a/spec/isodoc/presentation_xml_spec.rb +++ b/spec/isodoc/presentation_xml_spec.rb @@ -137,7 +137,7 @@ 1 - . + . @@ -156,7 +156,7 @@ 1 . 1 - . + . @@ -238,10 +238,10 @@ html = <<~OUTPUT #{HTML_HDR}
-

1.\u00a0 Clause

+

1.\u00a0 Clause

Text

-

1.1.\u00a0 Subclause

“A” ‘B’

+

1.1.\u00a0 Subclause

“A” ‘B’

-

1.  Clause

+

1.  Clause

Text

-

1.1.  Subclause

“A” ‘B’

+

1.1.  Subclause

“A” ‘B’

-

1.\u00a0 Normative References

+

1.\u00a0 Normative References

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this @@ -923,7 +923,7 @@ 1 - . + . @@ -1067,7 +1067,7 @@

Table of contents

-

1.\u00a0 Normative References

+

1.\u00a0 Normative References

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

[ISO/IEC\u00a0Guide\u00a099:2007], ISO/IEC\u00a0Guide\u00a099:2007 @@ -1181,7 +1181,7 @@ 1 - . + . @@ -1224,7 +1224,7 @@ 1 - . + . diff --git a/spec/isodoc/ref_spec.rb b/spec/isodoc/ref_spec.rb index 82418ce8..9132a834 100644 --- a/spec/isodoc/ref_spec.rb +++ b/spec/isodoc/ref_spec.rb @@ -193,7 +193,7 @@ 1 - . + . @@ -431,7 +431,7 @@

-

1.  Normative References

+

1.  Normative References

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

[1], ISO 712, International Organization for Standardization. Cereals and cereal products.

ISO 16634:-- (all parts)1 @@ -508,7 +508,7 @@

-

1.  Normative References

+

1.  Normative References

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

@@ -951,7 +951,7 @@ 1 - . + . @@ -1068,7 +1068,7 @@ 1 - . + . @@ -1490,7 +1490,7 @@ - . + . @@ -1950,7 +1950,7 @@ 1 - . + . @@ -2126,7 +2126,7 @@ 1 - . + . @@ -2176,7 +2176,7 @@ 1 . 1 - . + . @@ -2333,7 +2333,7 @@

Table of contents

-

1.\u00a0 Normative References

+

1.\u00a0 Normative References

Text

@@ -2348,7 +2348,7 @@

More text

-

1.1.\u00a0 Normative 1

+

1.1.\u00a0 Normative 1

[A .], XYZ @@ -2447,7 +2447,7 @@ 1 - . + . @@ -2465,7 +2465,7 @@ 1 . 1 - . + . @@ -2486,7 +2486,7 @@ 1 . 2 - . + . @@ -2528,12 +2528,12 @@ html = <<~OUTPUT #{HTML_HDR}

-

1.\u00a0 First References

+

1.\u00a0 First References

-

1.1.\u00a0 Normative References 1

+

1.1.\u00a0 Normative References 1

-

1.2.\u00a0 Normative References 2

+

1.2.\u00a0 Normative References 2


diff --git a/spec/isodoc/section_spec.rb b/spec/isodoc/section_spec.rb index 4f9fbe9d..8262e84b 100644 --- a/spec/isodoc/section_spec.rb +++ b/spec/isodoc/section_spec.rb @@ -185,7 +185,7 @@ 1 - . + . @@ -214,7 +214,7 @@ 1 - . + . @@ -327,7 +327,7 @@ A . 1 - . + . @@ -393,7 +393,7 @@ B . 1 - . + . @@ -414,7 +414,7 @@ 1 . 1 - . + . @@ -448,7 +448,7 @@ B . 2 - . + . @@ -469,7 +469,7 @@ 2 . 1 - . + . @@ -537,7 +537,7 @@ C . 1 - . + . @@ -558,7 +558,7 @@ 1 . 1 - . + . @@ -592,7 +592,7 @@ C . 2 - . + . @@ -647,7 +647,7 @@ D . 1 - . + . @@ -811,7 +811,7 @@ 1 - . + . @@ -830,7 +830,7 @@ 1 . 1 - . + . @@ -1024,9 +1024,9 @@

Table of contents

-

1.

+

1.

A

-

1.1.

+

1.1.

B

@@ -1119,10 +1119,10 @@
-

1.

+

1.

A

-

1.1.

+

1.1.

B

diff --git a/spec/isodoc/section_title_spec.rb b/spec/isodoc/section_title_spec.rb index 26379323..67b54883 100644 --- a/spec/isodoc/section_title_spec.rb +++ b/spec/isodoc/section_title_spec.rb @@ -234,7 +234,7 @@ 1 - . + . @@ -252,7 +252,7 @@ 3 - . + . @@ -270,7 +270,7 @@ 3 . 1 - . + . @@ -291,7 +291,7 @@ 1 . 1 - . + . @@ -325,7 +325,7 @@ 3 . 2 - . + . @@ -349,7 +349,7 @@ 4 - . + . @@ -370,7 +370,7 @@ 5 - . + . @@ -388,7 +388,7 @@ 5 . 1 - . + . @@ -409,7 +409,7 @@ 5 . 2 - . + . @@ -429,7 +429,7 @@ 5 . 3 - . + . @@ -445,7 +445,7 @@ 2 - . + . @@ -498,7 +498,7 @@ A . 1 - . + . @@ -520,7 +520,7 @@ 1 . 1 - . + . @@ -545,7 +545,7 @@ 1 . 2 - . + . @@ -698,23 +698,23 @@

Initial admonition

-

1.\u00a0 Scope

+

1.\u00a0 Scope

Text

-

2.\u00a0 Normative References

+

2.\u00a0 Normative References

-

3.\u00a0 Terms, Definitions, Symbols and Abbreviated Terms

+

3.\u00a0 Terms, Definitions, Symbols and Abbreviated Terms

-

3.1.\u00a0 Normal Terms

-

3.1.1.

+

3.1.\u00a0 Normal Terms

+

3.1.1.

Term2

-

3.2.\u00a0 Symbols

+

3.2.\u00a0 Symbols

@@ -726,7 +726,7 @@
-

4.\u00a0 Symbols and abbreviated terms

+

4.\u00a0 Symbols and abbreviated terms

@@ -737,15 +737,15 @@
-

5.\u00a0 Clause 4

+

5.\u00a0 Clause 4

-

5.1.\u00a0 Introduction

+

5.1.\u00a0 Introduction

-

5.2.\u00a0 Clause 4.2

+

5.2.\u00a0 Clause 4.2

-

5.3.

+

5.3.


@@ -753,12 +753,12 @@

Annex A
(normative)

Annex

-

A.1.\u00a0 Annex A.1

+

A.1.\u00a0 Annex A.1

-

A.1.1.\u00a0 Annex A.1a

+

A.1.1.\u00a0 Annex A.1a

-

A.1.2.\u00a0 Annex Bibliography

+

A.1.2.\u00a0 Annex Bibliography

@@ -897,40 +897,35 @@

- 1. - \u00a0 + 1.\u00a0 Scope

Text

- 2. - \u00a0 + 2.\u00a0 Normative References

- 3. - \u00a0 + 3.\u00a0 Terms, Definitions, Symbols and Abbreviated Terms

- 3.1. - \u00a0 + 3.1.\u00a0 Normal Terms

-

3.1.1.

+

3.1.1.

Term2

- 3.2. - \u00a0 + 3.2.\u00a0 Symbols

@@ -947,8 +942,7 @@

- 4. - \u00a0 + 4.\u00a0 Symbols and abbreviated terms

@@ -964,26 +958,23 @@

- 5. - \u00a0 + 5.\u00a0 Clause 4

- 5.1. - \u00a0 + 5.1.\u00a0 Introduction

- 5.2. - \u00a0 + 5.2.\u00a0 Clause 4.2

-

5.3.

+

5.3.

@@ -993,12 +984,12 @@

Annex A
(normative)

Annex

-

A.1. \u00a0 Annex A.1

+

A.1.\u00a0 Annex A.1

-

A.1.1. \u00a0 Annex A.1a

+

A.1.1.\u00a0 Annex A.1a

-

A.1.2. \u00a0 Annex Bibliography

+

A.1.2.\u00a0 Annex Bibliography

@@ -1119,7 +1110,7 @@ A . 1 - . + . @@ -1187,7 +1178,7 @@ A . 1 - . + . @@ -1380,21 +1371,21 @@

Initial admonition

-

1.\u00a0 Scope

Variant 1

+

1.\u00a0 Scope

Variant 1

Text

-

2.\u00a0 Normative References

Variant 1

+

2.\u00a0 Normative References

Variant 1

-

3.\u00a0 Terms, Definitions, Symbols and Abbreviated Terms

Variant 1

+

3.\u00a0 Terms, Definitions, Symbols and Abbreviated Terms

Variant 1

-

3.1.\u00a0 Normal Terms

Variant 1

-

3.1.1.

+

3.1.\u00a0 Normal Terms

Variant 1

+

3.1.1.

Term2

-

3.2.\u00a0 Definitions

Variant 1

+

3.2.\u00a0 Definitions

Variant 1

@@ -1406,7 +1397,7 @@
-

4.\u00a0 Symbols and abbreviated terms

Variant 1

+

4.\u00a0 Symbols and abbreviated terms

Variant 1

@@ -1417,15 +1408,15 @@
-

5.\u00a0 Clause 4

Variant 1

+

5.\u00a0 Clause 4

Variant 1

-

5.1.\u00a0 Introduction

Variant 1

+

5.1.\u00a0 Introduction

Variant 1

-

5.2.\u00a0 Clause 4.2

Variant 1

+

5.2.\u00a0 Clause 4.2

Variant 1

-

5.3.

+

5.3.


@@ -1434,12 +1425,12 @@
-

A.1.\u00a0 Annex A.1

Variant 1

+

A.1.\u00a0 Annex A.1

Variant 1

-

A.1.1.\u00a0 Annex A.1a

Variant 1

+

A.1.1.\u00a0 Annex A.1a

Variant 1

-

A.1.2.\u00a0 Annex Bibliography

Variant 1

+

A.1.2.\u00a0 Annex Bibliography

Variant 1

@@ -1525,23 +1516,23 @@

Initial admonition

-

1. \u00a0 Scope

Variant 1

+

1.\u00a0 Scope

Variant 1

Text

-

2. \u00a0 Normative References

Variant 1

+

2.\u00a0 Normative References

Variant 1

-

3. \u00a0 Terms, Definitions, Symbols and Abbreviated Terms

Variant 1

+

3.\u00a0 Terms, Definitions, Symbols and Abbreviated Terms

Variant 1

-

3.1. \u00a0 Normal Terms

Variant 1

-

3.1.1.

+

3.1.\u00a0 Normal Terms

Variant 1

+

3.1.1.

Term2

-

3.2. \u00a0 Definitions

Variant 1

+

3.2.\u00a0 Definitions

Variant 1

List Title
@@ -1555,7 +1546,7 @@
-

4. \u00a0 Symbols and abbreviated terms

Variant 1

+

4.\u00a0 Symbols and abbreviated terms

Variant 1

@@ -1568,15 +1559,15 @@
-

5. \u00a0 Clause 4

Variant 1

+

5.\u00a0 Clause 4

Variant 1

-

5.1. \u00a0 Introduction

Variant 1

+

5.1.\u00a0 Introduction

Variant 1

-

5.2. \u00a0 Clause 4.2

Variant 1

+

5.2.\u00a0 Clause 4.2

Variant 1

-

5.3.

+

5.3.

@@ -1591,12 +1582,12 @@

-

A.1. \u00a0 Annex A.1

Variant 1

+

A.1.\u00a0 Annex A.1

Variant 1

-

A.1.1. \u00a0 Annex A.1a

Variant 1

+

A.1.1.\u00a0 Annex A.1a

Variant 1

-

A.1.2. \u00a0 Annex Bibliography

Variant 1

+

A.1.2.\u00a0 Annex Bibliography

Variant 1

@@ -1748,7 +1739,7 @@ 1.1 - . + . @@ -2015,7 +2006,7 @@ 1 - . + . @@ -2029,7 +2020,7 @@ 2 - . + . @@ -2157,7 +2148,7 @@ 1 - . + . @@ -2175,7 +2166,7 @@ 1 . 1 - . + . @@ -2196,7 +2187,7 @@ 1 . 2 - . + . @@ -2219,12 +2210,12 @@ html = <<~"OUTPUT" #{HTML_HDR}
-

1.\u00a0 Clause 4

+

1.\u00a0 Clause 4

-

1.1.\u00a0 Introduction

+

1.1.\u00a0 Introduction

- 1.2.\u00a0 Clause 4.2\u00a0 + 1.2.\u00a0 Clause 4.2\u00a0

ABC

@@ -2332,7 +2323,7 @@ 1 - . + . @@ -2345,7 +2336,7 @@ 1 . 1 - . + .
@@ -2361,7 +2352,7 @@ 1 . 2 - . + . diff --git a/spec/isodoc/table_spec.rb b/spec/isodoc/table_spec.rb index db0e7999..25bf12ad 100644 --- a/spec/isodoc/table_spec.rb +++ b/spec/isodoc/table_spec.rb @@ -320,7 +320,7 @@ def table_custom_class_html(table_xml) 1 - . + . @@ -514,7 +514,10 @@ def table_custom_class_html(table_xml)
-

1.  Normative References

+
+

1. +   Normative References +

ISO 712, International Organization for Standardization. Cereals and cereal products.


@@ -652,7 +655,7 @@ def table_custom_class_html(table_xml)

-

1.  Normative References

+

1.  Normative References

ISO 712, International Organization for Standardization. Cereals and cereal products.

diff --git a/spec/isodoc/terms_designations.spec.rb b/spec/isodoc/terms_designations.spec.rb index b916fedd..737a59e2 100644 --- a/spec/isodoc/terms_designations.spec.rb +++ b/spec/isodoc/terms_designations.spec.rb @@ -40,7 +40,7 @@ 1 - . + . @@ -57,7 +57,7 @@ 1 . 1 - . + . @@ -113,7 +113,7 @@ 1 . 2 - . + . @@ -169,7 +169,7 @@ 1 . 3 - . + . @@ -227,7 +227,7 @@ 1 . 4 - . + . @@ -326,7 +326,7 @@ 1 - . + . @@ -343,7 +343,7 @@ 1 . 1 - . + . @@ -460,7 +460,7 @@ 1 - . + . @@ -477,7 +477,7 @@ 1 . 1 - . + . @@ -670,7 +670,7 @@ 1 - . + . @@ -687,7 +687,7 @@ 1 . 1 - . + . @@ -732,7 +732,7 @@ 1 . 2 - . + . @@ -846,65 +846,40 @@ OUTPUT html = <<~OUTPUT - - + + -

-

\u00a0

-
-
-
-

\u00a0

-
-
-
-
-
-

Table of contents

-
-
-

1.\u00a0 Terms and definitions

-

1.1.

-

- Second Term - , <Field, Usage Info 1> -

- Definition 1 -

1.2.

-

- First Designation -

-
-

- CONTRAST: - - Fifth Designation - , n - - ( - Clause 1.1 - ) -

-

- SEE: - **RELATED TERM NOT FOUND** -

-

- SEE ALSO: - **RELATED TERM NOT FOUND** -

-

- CONTRAST: - - Fifth Designation - -

-
- Definition 2 -
-
+
+

 

+
+
+
+

 

+
+
+
+
+
+

Table of contents

+
+

1.  Terms and definitions

+ +

1.1.

+

Second Term, <Field, Usage Info 1>

+ Definition 1 + +

1.2.

+

First Designation

+ + + +

CONTRAST: Fifth Designation, n (Clause 1.1)

SEE: **RELATED TERM NOT FOUND**

SEE ALSO: **RELATED TERM NOT FOUND**

CONTRAST: Fifth Designation

+ Definition 2 + +
+
- + OUTPUT pres_output = IsoDoc::PresentationXMLConvert .new(presxml_options) @@ -916,6 +891,7 @@ .convert("test", pres_output, true))) .to be_html5_equivalent_to html end + it "renders generator errormsg in related in boldface" do input = <<~INPUT diff --git a/spec/isodoc/terms_spec.rb b/spec/isodoc/terms_spec.rb index df69dc08..3244fab9 100644 --- a/spec/isodoc/terms_spec.rb +++ b/spec/isodoc/terms_spec.rb @@ -27,7 +27,7 @@ 1 - . + . @@ -44,7 +44,7 @@ 1 . 1 - . + . @@ -75,13 +75,18 @@ html = <<~"OUTPUT" #{HTML_HDR} -

1.\u00a0 Terms, Definitions, Symbols and Abbreviated Terms

-

1.1.

-

Term2

+
+

1.  Terms, Definitions, Symbols and Abbreviated Terms

+

1.1.

+

+ + Term2 + +

+
-
- - + + OUTPUT pres_output = IsoDoc::PresentationXMLConvert .new(presxml_options) @@ -194,7 +199,7 @@ 1 - . + . @@ -212,7 +217,7 @@ 1 . 1 - . + . @@ -421,7 +426,7 @@ 1 . 2 - . + . @@ -633,80 +638,68 @@ html = <<~"OUTPUT" #{HTML_HDR} -
-

1.\u00a0 Terms and Definitions

-

For the purposes of this document, the following terms and definitions apply.

-

1.1.

-

- paddy - , <in agriculture, dated> [SOURCE: ISO\u00a07301:2011, Clause 3.1, modified — The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here] -

-

<rice> rice retaining its husk after threshing

-
-

EXAMPLE 1

-

Foreign seeds, husks, bran, sand, dust.

-
-
    -
  • A
  • -
-
-
-
-

EXAMPLE 2

-
-
    -
  • A
  • -
-
-
-

[SOURCE: t1 — comment; Termbase IEV, term ID xyz, modified — with adjustments; t1, adapted]

-

1.2.

-

- - paddy - -

-

- paddy rice - , <in agriculture> -

-

- rough rice -

-

- DEPRECATED: - cargo rice -

-

rice retaining its husk after threshing

-
-

EXAMPLE

-
-
    -
  • A
  • -
-
-
-
-

- Note 1 to entry: - The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking. -

-
-
-

- Note 2 to entry: -

-
-
    -
  • A
  • -
-
-

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

-
-

[SOURCE: ISO\u00a07301:2011, 3.1ISO\u00a07301:2011, clause 3.1]

-
+
+

1.  Terms and Definitions

+

For the purposes of this document, the following terms and definitions apply.

+

1.1.

+

paddy, <in agriculture, dated> [SOURCE: ISO 7301:2011, Clause 3.1, modified — The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]

+

<rice> rice retaining its husk after threshing

+
+

EXAMPLE 1

+

Foreign seeds, husks, bran, sand, dust.

+
+
    +
  • A
  • +
+
+
+
+

EXAMPLE 2

+
+
    +
  • A
  • +
+
+
+

[SOURCE: t1 — comment; Termbase IEV, term ID xyz, modified — with adjustments; t1, adapted]

+

1.2.

+

+ + paddy + +

+

paddy rice, <in agriculture>

+

+ rough rice +

+

DEPRECATED: cargo rice

+

rice retaining its husk after threshing

+
+

EXAMPLE

+
+
    +
  • A
  • +
+
+
+
+

Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

+
+
+

+ Note 2 to entry: +

+
+
    +
  • A
  • +
+
+

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

+
+

[SOURCE: ISO 7301:2011, 3.1ISO 7301:2011, clause 3.1]

- +
+ OUTPUT @@ -717,73 +710,65 @@


-
-
-

- 1. - \u00a0 - Terms and Definitions -

-

For the purposes of this document, the following terms and definitions apply.

-

1.1.

-

- paddy - , <in agriculture, dated> [SOURCE: ISO\u00a07301:2011, Clause 3.1, modified — The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here] -

-

<rice> rice retaining its husk after threshing

-
-

EXAMPLE 1

-

Foreign seeds, husks, bran, sand, dust.

-
-
    -
  • A
  • -
-
-
-
-

EXAMPLE 2

-
-
    -
  • A
  • -
-
-
-

[SOURCE: t1 — comment; Termbase IEV, term ID xyz, modified — with adjustments; t1, adapted]

-

1.2.

-

paddy

-

paddy rice, <in agriculture>

-

rough rice

-

DEPRECATED: cargo rice

-

rice retaining its husk after threshing

-
-

EXAMPLE

-
-
    -
  • A
  • -
-
-
-
-

- Note 1 to entry: - The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking. -

-
-
-

- Note 2 to entry: -

-
-
    -
  • A
  • -
-
-

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

-
-

[SOURCE: ISO\u00a07301:2011, 3.1ISO\u00a07301:2011, clause 3.1]

-
+
+
+

1.  Terms and Definitions

+

For the purposes of this document, the following terms and definitions apply.

+

1.1.

+

paddy, <in agriculture, dated> [SOURCE: ISO 7301:2011, Clause 3.1, modified — The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]

+

<rice> rice retaining its husk after threshing

+
+

EXAMPLE 1

+

Foreign seeds, husks, bran, sand, dust.

+
+
    +
  • A
  • +
+
+
+
+

EXAMPLE 2

+
+
    +
  • A
  • +
+
+
+

[SOURCE: t1 — comment; Termbase IEV, term ID xyz, modified — with adjustments; t1, adapted]

+

1.2.

+

+ paddy +

+

paddy rice, <in agriculture>

+

rough rice

+

DEPRECATED: cargo rice

+

rice retaining its husk after threshing

+
+

EXAMPLE

+
+
    +
  • A
  • +
+
+
+
+

Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

+
+
+

+ Note 2 to entry: +

+
+
    +
  • A
  • +
+
+

The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

+
+

[SOURCE: ISO 7301:2011, 3.1ISO 7301:2011, clause 3.1]

- +
+ WORD pres_output = IsoDoc::PresentationXMLConvert @@ -853,7 +838,7 @@ 1 - . + . @@ -871,7 +856,7 @@ 1 . 1 - . + . @@ -1158,7 +1143,7 @@ 1 - . + . @@ -1176,7 +1161,7 @@ 1 . 1 - . + . @@ -1318,7 +1303,7 @@ 1 . 2 - . + . @@ -1528,7 +1513,7 @@ 1 - . + . @@ -1546,7 +1531,7 @@ 1 . 1 - . + . @@ -1709,7 +1694,7 @@ 1 - . + . @@ -1727,7 +1712,7 @@ 1 . 1 - . + . @@ -1914,7 +1899,7 @@ 1 - . + . @@ -1932,7 +1917,7 @@ 1 . 1 - . + . @@ -1974,7 +1959,7 @@ 1 . 2 - . + . diff --git a/spec/isodoc/xref_examples_spec.rb b/spec/isodoc/xref_examples_spec.rb index b3e8ea54..bccce8a2 100644 --- a/spec/isodoc/xref_examples_spec.rb +++ b/spec/isodoc/xref_examples_spec.rb @@ -206,7 +206,7 @@ 3 . 1 - . + . diff --git a/spec/isodoc/xref_format_spec.rb b/spec/isodoc/xref_format_spec.rb index 4cf588fe..fe19bba6 100644 --- a/spec/isodoc/xref_format_spec.rb +++ b/spec/isodoc/xref_format_spec.rb @@ -127,7 +127,7 @@ 2 - . + . @@ -205,7 +205,7 @@ 2 - . + . @@ -272,7 +272,7 @@ 2 - . + . @@ -502,7 +502,7 @@ 2 - . + . @@ -664,7 +664,7 @@ 2 - . + .