require "spec_helper" RSpec.describe IsoDoc do it "cross-references notes" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)). to be_equivalent_to <<~"OUTPUT"

Scope

These results are based on a study carried out on three different types of kernel.

Widgets

These results are based on a study carried out on three different types of kernel.

These results are based on a study carried out on three different types of kernel.

These results are based on a study carried out on three different types of kernel.

These results are based on a study carried out on three different types of kernel.

These results are based on a study carried out on three different types of kernel.

INPUT #{HTML_HDR}

Foreword

Clause 1, Note 3.1, Note 1 3.1, Note 2 A.1, Note A.2, Note 1 A.2, Note 2

1.  Scope

NOTE  These results are based on a study carried out on three different types of kernel.

Note

2.  Terms and definitions

No terms and definitions are listed in this document.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.  Widgets

NOTE 1  These results are based on a study carried out on three different types of kernel.

NOTE 2  These results are based on a study carried out on three different types of kernel.

Note 1 Note 2


NOTE  These results are based on a study carried out on three different types of kernel.

NOTE 1  These results are based on a study carried out on three different types of kernel.

NOTE 2  These results are based on a study carried out on three different types of kernel.

OUTPUT end it "cross-references figures" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope
Split-it-right sample divider

Widgets
Split-it-right sample divider
Split-it-right sample divider

Split-it-right sample divider
Split-it-right sample divider
Split-it-right sample divider
INPUT #{HTML_HDR}

Foreword

Figure 1 Figure 2 Figure 3 Figure A.1 Figure A.2 Figure A.3

1.  Scope

Figure 1 — Split-it-right sample divider

Figure 1

2.  Terms and definitions

No terms and definitions are listed in this document.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.  Widgets

Figure 2 — Split-it-right sample divider

Figure 3 — Split-it-right sample divider

Figure 2 Figure 3


Figure A.1 — Split-it-right sample divider

Figure A.2 — Split-it-right sample divider

Figure A.3 — Split-it-right sample divider

OUTPUT end it "cross-references subfigures" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope Widgets
Split-it-right sample divider
Split-it-right sample divider

Split-it-right sample divider
Split-it-right sample divider
INPUT #{HTML_HDR}

Foreword

Figure 1 Figure 1-1 Figure 1-2 Figure A.1 Figure A.1-1 Figure A.1-2

1.  Scope

2.  Terms and definitions

No terms and definitions are listed in this document.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.  Widgets

Figure 1-1 — Split-it-right sample divider

Figure 1-2 — Split-it-right sample divider

Figure 1-1 Figure 1-2


Figure A.1-1 — Split-it-right sample divider

Figure A.1-2 — Split-it-right sample divider

OUTPUT end it "cross-references examples" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope

Hello

Widgets

Hello

Hello

Hello

Hello

Hello

INPUT #{HTML_HDR}

Foreword

Clause 1, Example 3.1, Example 1 3.1, Example 2 A.1, Example A.2, Example 1 A.2, Example 2

1.  Scope

EXAMPLE

Hello

Example

2.  Terms and definitions

No terms and definitions are listed in this document.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.  Widgets

EXAMPLE 1

Hello

EXAMPLE 2

Hello

Example 1 Example 2


EXAMPLE

Hello

EXAMPLE 1

Hello

EXAMPLE 2

Hello

OUTPUT end it "cross-references formulae" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope r = 1 %

Widgets r = 1 % r = 1 %

r = 1 % r = 1 % r = 1 %
r = 1 %
r

is the repeatability limit.

INPUT #{HTML_HDR}

Foreword

Clause 1, Formula (1) 3.1, Formula (2) 3.1, Formula (3) A.1, Formula (A.1) A.2, Formula (A.2) A.2, Formula (A.3)

1.  Scope

(#(r = 1 %)#)  (1)

Formula (1)

2.  Terms and definitions

No terms and definitions are listed in this document.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.  Widgets

(#(r = 1 %)#)  (2)
(#(r = 1 %)#)  (3)

Formula (2) Formula (3)


(#(r = 1 %)#)  (A.1)
(#(r = 1 %)#)  (A.2)
(#(r = 1 %)#)  (A.3)
OUTPUT end it "cross-references tables" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope Repeatability and reproducibility of husked rice yield
Number of laboratories retained after eliminating outliers 13 11

Widgets Repeatability and reproducibility of husked rice yield
Number of laboratories retained after eliminating outliers 13 11
Repeatability and reproducibility of husked rice yield
Number of laboratories retained after eliminating outliers 13 11

Repeatability and reproducibility of husked rice yield
Number of laboratories retained after eliminating outliers 13 11
Repeatability and reproducibility of husked rice yield
Number of laboratories retained after eliminating outliers 13 11
Repeatability and reproducibility of husked rice yield
Number of laboratories retained after eliminating outliers 13 11
INPUT #{HTML_HDR}

Foreword

Table 1 Table 2 Table 3 Table A.1 Table A.2 Table A.3

1.  Scope

Table 1 — Repeatability and reproducibility of husked rice yield

Number of laboratories retained after eliminating outliers 13 11

Table 1

2.  Terms and definitions

No terms and definitions are listed in this document.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.  Widgets

Table 2 — Repeatability and reproducibility of husked rice yield

Number of laboratories retained after eliminating outliers1311

Table 3 — Repeatability and reproducibility of husked rice yield

Number of laboratories retained after eliminating outliers1311

Table 2 Table 3


Table A.1 — Repeatability and reproducibility of husked rice yield

Number of laboratories retained after eliminating outliers1311

Table A.2 — Repeatability and reproducibility of husked rice yield

Number of laboratories retained after eliminating outliers1311

Table A.3 — Repeatability and reproducibility of husked rice yield

Number of laboratories retained after eliminating outliers1311
OUTPUT end it "cross-references term notes" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope waxy rice

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

nonwaxy rice

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

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

INPUT #{HTML_HDR}

Foreword

2.1, Note 1 2.2, Note 1 2.2, Note 2

1.  Scope

2.  Terms and definitions

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

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

2.1

waxy rice

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

2.2

nonwaxy rice

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: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.

OUTPUT end it "cross-references sections" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT" Foreword

This is a preamble

Introduction Introduction Subsection

This is patent boilerplate

Scope

Text

Terms, definitions, symbols and abbreviated terms Normal Terms Term2
Symbol
Definition
Symbol
Definition
Clause 4 Introduction Clause 4.2
Annex Annex A.1 Annex A.1a An Appendix Normative References Bibliography Bibliography Subsection
INPUT #{HTML_HDR}

Foreword

This is a preamble 0.1 Clause 1 Clause 3 3.1 3.1.1 3.2 Clause 4 Clause 5 5.1 5.2 Annex A A.1 A.1.1 Annex A, Appendix 1 Clause 2


0.  Introduction

0.1. Introduction Subsection

This is patent boilerplate

1.  Scope

Text

2.  Normative references

There are no normative references in this document.

3.  Terms and definitions

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

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.1. Normal Terms

3.1.1

Term2

3.2. Symbols and abbreviated terms

Symbol

Definition

4.  Symbols and abbreviated terms

Symbol

Definition

5.  Clause 4

5.1. Introduction

5.2. Clause 4.2


Annex A
(normative)

Annex

A.1. Annex A.1

A.1.1. Annex A.1a

Appendix 1. An Appendix


Bibliography

Bibliography Subsection

OUTPUT end it "cross-references lists" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope
  1. A

Widgets

    These results are based on a study carried out on three different types of kernel.

    These results are based on a study carried out on three different types of kernel.

    These results are based on a study carried out on three different types of kernel.

    These results are based on a study carried out on three different types of kernel.

    These results are based on a study carried out on three different types of kernel.

INPUT #{HTML_HDR}

Foreword

Clause 1, List 3.1, List 1 3.1, List 2 A.1, List A.2, List 1 A.2, List 2

1.  Scope

  1. A

2.  Terms and definitions

No terms and definitions are listed in this document.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.  Widgets

    These results are based on a study carried out on three different types of kernel.

    These results are based on a study carried out on three different types of kernel.


    These results are based on a study carried out on three different types of kernel.

    These results are based on a study carried out on three different types of kernel.

    These results are based on a study carried out on three different types of kernel.

OUTPUT end it "cross-references list items" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope
  1. A

Widgets
  1. A

  1. A

  1. A

  1. A

  1. A

INPUT #{HTML_HDR}

Foreword

Clause 1, a) 3.1, List 1 a) 3.1, List 2 a) A.1, a) A.2, List 1 a) A.2, List 2 a)

1.  Scope

  1. A

2.  Terms and definitions

No terms and definitions are listed in this document.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.  Widgets

  1. A

  1. A


  1. A

  1. A

  1. A

OUTPUT end it "cross-references nested list items" do expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"

Scope
  1. A

    1. A

      1. A

        1. A

          1. A

            1. A

INPUT #{HTML_HDR}

Foreword

Clause 1, a) Clause 1, a.1) Clause 1, a.1.i) Clause 1, a.1.i.A) Clause 1, a.1.i.A.I) Clause 1, a.1.i.A.I.a)

1.  Scope

  1. A

    1. A

      1. A

        1. A

          1. A

            1. A

OUTPUT end end