isodoc 1.0.25 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +12 -2
- data/.github/workflows/ubuntu.yml +15 -3
- data/.github/workflows/windows.yml +12 -2
- data/isodoc.gemspec +2 -2
- data/lib/isodoc.rb +2 -0
- data/lib/isodoc/common.rb +0 -4
- data/lib/isodoc/convert.rb +18 -8
- data/lib/isodoc/function/blocks.rb +46 -52
- data/lib/isodoc/function/blocks_example_note.rb +108 -0
- data/lib/isodoc/function/cleanup.rb +14 -2
- data/lib/isodoc/function/i18n.rb +1 -0
- data/lib/isodoc/function/inline.rb +76 -82
- data/lib/isodoc/function/inline_simple.rb +72 -0
- data/lib/isodoc/function/lists.rb +12 -6
- data/lib/isodoc/function/references.rb +49 -53
- data/lib/isodoc/function/reqt.rb +14 -5
- data/lib/isodoc/function/section.rb +10 -12
- data/lib/isodoc/function/table.rb +4 -5
- data/lib/isodoc/function/terms.rb +3 -3
- data/lib/isodoc/function/to_word_html.rb +22 -12
- data/lib/isodoc/function/utils.rb +9 -3
- data/lib/isodoc/headlesshtml_convert.rb +12 -6
- data/lib/isodoc/html_convert.rb +7 -1
- data/lib/isodoc/html_function/footnotes.rb +1 -1
- data/lib/isodoc/html_function/html.rb +16 -1
- data/lib/isodoc/html_function/postprocess.rb +6 -5
- data/lib/isodoc/metadata.rb +6 -0
- data/lib/isodoc/metadata_date.rb +19 -7
- data/lib/isodoc/pdf_convert.rb +13 -6
- data/lib/isodoc/presentation_xml_convert.rb +29 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_convert.rb +7 -1
- data/lib/isodoc/word_function/body.rb +14 -48
- data/lib/isodoc/word_function/footnotes.rb +1 -1
- data/lib/isodoc/word_function/inline.rb +75 -0
- data/lib/isodoc/word_function/postprocess.rb +1 -0
- data/lib/isodoc/word_function/table.rb +3 -3
- data/lib/isodoc/xref.rb +59 -0
- data/lib/isodoc/{function → xref}/xref_anchor.rb +10 -21
- data/lib/isodoc/xref/xref_counter.rb +74 -0
- data/lib/isodoc/{function → xref}/xref_gen.rb +11 -23
- data/lib/isodoc/{function → xref}/xref_gen_seq.rb +41 -32
- data/lib/isodoc/{function → xref}/xref_sect_gen.rb +54 -40
- data/lib/isodoc/xslfo_convert.rb +21 -4
- data/spec/assets/i18n.yaml +4 -1
- data/spec/assets/odf.emf +0 -0
- data/spec/assets/odf.svg +4 -0
- data/spec/assets/odf1.svg +4 -0
- data/spec/isodoc/blocks_spec.rb +271 -48
- data/spec/isodoc/cleanup_spec.rb +139 -17
- data/spec/isodoc/footnotes_spec.rb +20 -5
- data/spec/isodoc/i18n_spec.rb +8 -8
- data/spec/isodoc/inline_spec.rb +299 -4
- data/spec/isodoc/lists_spec.rb +8 -8
- data/spec/isodoc/metadata_spec.rb +110 -3
- data/spec/isodoc/postproc_spec.rb +10 -14
- data/spec/isodoc/presentation_xml_spec.rb +20 -0
- data/spec/isodoc/ref_spec.rb +121 -52
- data/spec/isodoc/section_spec.rb +232 -208
- data/spec/isodoc/table_spec.rb +28 -28
- data/spec/isodoc/terms_spec.rb +7 -7
- data/spec/isodoc/xref_spec.rb +206 -59
- metadata +24 -17
- data/lib/isodoc/function/blocks_example.rb +0 -53
- data/lib/isodoc/function/xref_counter.rb +0 -50
data/spec/isodoc/section_spec.rb
CHANGED
@@ -70,6 +70,8 @@ RSpec.describe IsoDoc do
|
|
70
70
|
<title>Acknowledgements</title>
|
71
71
|
</acknowledgements>
|
72
72
|
</preface><sections>
|
73
|
+
<note id="NN1"><p>Initial note</p></note>
|
74
|
+
<admonition id="NN2" type="warning"><p>Initial admonition</p></admonition>
|
73
75
|
<clause id="D" obligation="normative">
|
74
76
|
<title>Scope</title>
|
75
77
|
<p id="E">Text</p>
|
@@ -112,16 +114,16 @@ RSpec.describe IsoDoc do
|
|
112
114
|
<clause id="Q1" inline-header="false" obligation="normative">
|
113
115
|
<title>Annex A.1a</title>
|
114
116
|
</clause>
|
115
|
-
<references id="Q2"><title>Annex Bibliography</title></references>
|
117
|
+
<references id="Q2" normative="false"><title>Annex Bibliography</title></references>
|
116
118
|
</clause>
|
117
119
|
</annex>
|
118
120
|
<annex id="P1" inline-header="false" obligation="normative">
|
119
121
|
</annex>
|
120
|
-
<bibliography><references id="R" obligation="informative">
|
122
|
+
<bibliography><references id="R" obligation="informative" normative="true">
|
121
123
|
<title>Normative References</title>
|
122
124
|
</references><clause id="S" obligation="informative">
|
123
125
|
<title>Bibliography</title>
|
124
|
-
<references id="T" obligation="informative">
|
126
|
+
<references id="T" obligation="informative" normative="false">
|
125
127
|
<title>Bibliography Subsection</title>
|
126
128
|
</references>
|
127
129
|
</clause>
|
@@ -181,6 +183,16 @@ RSpec.describe IsoDoc do
|
|
181
183
|
<h1 class='IntroTitle'>Acknowledgements</h1>
|
182
184
|
</div>
|
183
185
|
<p class="zzSTDTitle1"/>
|
186
|
+
<div id='NN1' class='Note'>
|
187
|
+
<p>
|
188
|
+
<span class='note_label'>NOTE</span>
|
189
|
+
  Initial note
|
190
|
+
</p>
|
191
|
+
</div>
|
192
|
+
<div id='NN2' class='Admonition'>
|
193
|
+
<p class='AdmonitionTitle' style='text-align:center;'>WARNING</p>
|
194
|
+
<p>Initial admonition</p>
|
195
|
+
</div>
|
184
196
|
<div id="D">
|
185
197
|
<h1>1.  Scope</h1>
|
186
198
|
<p id="E">Text</p>
|
@@ -342,11 +354,11 @@ OUTPUT
|
|
342
354
|
</annex>
|
343
355
|
<annex id="P1" inline-header="false" obligation="normative">
|
344
356
|
</annex>
|
345
|
-
<bibliography><references id="R" obligation="informative">
|
357
|
+
<bibliography><references id="R" obligation="informative" normative="true">
|
346
358
|
<title>Normative References</title>
|
347
359
|
</references><clause id="S" obligation="informative">
|
348
360
|
<title>Bibliography</title>
|
349
|
-
<references id="T" obligation="informative">
|
361
|
+
<references id="T" obligation="informative" normative="false">
|
350
362
|
<title>Bibliography Subsection</title>
|
351
363
|
</references>
|
352
364
|
</clause>
|
@@ -579,215 +591,225 @@ OUTPUT
|
|
579
591
|
<clause id="Q1" inline-header="false" obligation="normative">
|
580
592
|
<title>Annex A.1a<fn reference="17"><p>A</p></fn></title>
|
581
593
|
</clause>
|
582
|
-
<references id="Q2"><title>Annex Bibliography<fn reference="18"><p>A</p></fn></title></references>
|
594
|
+
<references id="Q2" normative="false"><title>Annex Bibliography<fn reference="18"><p>A</p></fn></title></references>
|
583
595
|
</clause>
|
584
|
-
</annex><bibliography><references id="R" obligation="informative">
|
596
|
+
</annex><bibliography><references id="R" obligation="informative" normative="true">
|
585
597
|
<title>Normative References<fn reference="19"><p>A</p></fn></title>
|
586
598
|
</references><clause id="S" obligation="informative">
|
587
599
|
<title>Bibliography<fn reference="20"><p>A</p></fn></title>
|
588
|
-
<references id="T" obligation="informative">
|
600
|
+
<references id="T" obligation="informative" normative="false">
|
589
601
|
<title>Bibliography Subsection<fn reference="21"><p>A</p></fn></title>
|
590
602
|
</references>
|
591
603
|
</clause>
|
592
604
|
</bibliography>
|
593
605
|
</iso-standard>
|
594
606
|
INPUT
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
</
|
607
|
+
<html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
|
608
|
+
<head/>
|
609
|
+
<body lang='en'>
|
610
|
+
<div class='title-section'>
|
611
|
+
<p> </p>
|
612
|
+
</div>
|
613
|
+
<br/>
|
614
|
+
<div class='prefatory-section'>
|
615
|
+
<p> </p>
|
616
|
+
</div>
|
617
|
+
<br/>
|
618
|
+
<div class='main-section'>
|
619
|
+
<div class='authority'>
|
620
|
+
<div class='boilerplate-copyright'>
|
621
|
+
<div>
|
622
|
+
<h1>
|
623
|
+
Copyright
|
624
|
+
<a class='FootnoteRef' href='#fn:1'>
|
625
|
+
<sup>1</sup>
|
626
|
+
</a>
|
627
|
+
</h1>
|
628
|
+
</div>
|
629
|
+
</div>
|
630
|
+
<div class='boilerplate-license'>
|
631
|
+
<div>
|
632
|
+
<h1>
|
633
|
+
License
|
634
|
+
<a class='FootnoteRef' href='#fn:2'>
|
635
|
+
<sup>2</sup>
|
636
|
+
</a>
|
637
|
+
</h1>
|
638
|
+
</div>
|
639
|
+
</div>
|
640
|
+
<div class='boilerplate-legal'>
|
641
|
+
<div>
|
642
|
+
<h1>
|
643
|
+
Legal
|
644
|
+
<a class='FootnoteRef' href='#fn:3'>
|
645
|
+
<sup>3</sup>
|
646
|
+
</a>
|
647
|
+
</h1>
|
648
|
+
</div>
|
649
|
+
</div>
|
650
|
+
<div class='boilerplate-feedback'>
|
651
|
+
<div>
|
652
|
+
<h1>
|
653
|
+
Feedback
|
654
|
+
<a class='FootnoteRef' href='#fn:4'>
|
655
|
+
<sup>4</sup>
|
656
|
+
</a>
|
657
|
+
</h1>
|
658
|
+
</div>
|
659
|
+
</div>
|
660
|
+
</div>
|
661
|
+
<br/>
|
662
|
+
<div>
|
663
|
+
<h1 class='AbstractTitle'>Abstract</h1>
|
664
|
+
</div>
|
665
|
+
<br/>
|
666
|
+
<div>
|
667
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
668
|
+
<p id='A'>This is a preamble</p>
|
669
|
+
</div>
|
670
|
+
<br/>
|
671
|
+
<div class='Section3' id='B'>
|
672
|
+
<h1 class='IntroTitle'>Introduction</h1>
|
673
|
+
<div id='C'>
|
674
|
+
<h2>
|
675
|
+
Introduction Subsection
|
676
|
+
<a class='FootnoteRef' href='#fn:8'>
|
677
|
+
<sup>8</sup>
|
678
|
+
</a>
|
679
|
+
</h2>
|
680
|
+
</div>
|
681
|
+
</div>
|
682
|
+
<p class='zzSTDTitle1'/>
|
683
|
+
<div>
|
684
|
+
<h1>1.  Normative references</h1>
|
685
|
+
</div>
|
686
|
+
<div id='H'>
|
687
|
+
<h1>
|
688
|
+
2.  Terms, Definitions, Symbols and Abbreviated Terms
|
689
|
+
<a class='FootnoteRef' href='#fn:10'>
|
690
|
+
<sup>10</sup>
|
691
|
+
</a>
|
692
|
+
</h1>
|
693
|
+
<div id='I'>
|
694
|
+
<h2>
|
695
|
+
2.1.  Normal Terms
|
696
|
+
<a class='FootnoteRef' href='#fn:11'>
|
697
|
+
<sup>11</sup>
|
698
|
+
</a>
|
699
|
+
</h2>
|
700
|
+
<p class='TermNum' id='J'>2.1.1.</p>
|
701
|
+
<p class='Terms' style='text-align:left;'>Term2</p>
|
702
|
+
</div>
|
703
|
+
<div id='K'>
|
704
|
+
<h2>
|
705
|
+
2.2.  Definitions
|
706
|
+
<a class='FootnoteRef' href='#fn:12'>
|
707
|
+
<sup>12</sup>
|
708
|
+
</a>
|
709
|
+
</h2>
|
710
|
+
<dl>
|
711
|
+
<dt>
|
712
|
+
<p>Symbol</p>
|
713
|
+
</dt>
|
714
|
+
<dd>Definition</dd>
|
715
|
+
</dl>
|
716
|
+
</div>
|
717
|
+
</div>
|
718
|
+
<div id='L' class='Symbols'>
|
719
|
+
<h1>3.  Symbols and abbreviated terms</h1>
|
720
|
+
<dl>
|
721
|
+
<dt>
|
722
|
+
<p>Symbol</p>
|
723
|
+
</dt>
|
724
|
+
<dd>Definition</dd>
|
725
|
+
</dl>
|
726
|
+
</div>
|
727
|
+
<div id='D'>
|
728
|
+
<h1>
|
729
|
+
4.  Scope
|
730
|
+
<a class='FootnoteRef' href='#fn:9'>
|
731
|
+
<sup>9</sup>
|
732
|
+
</a>
|
733
|
+
</h1>
|
734
|
+
<p id='E'>Text</p>
|
735
|
+
</div>
|
736
|
+
<div id='M'>
|
737
|
+
<h1>
|
738
|
+
5.  Clause 4
|
739
|
+
<a class='FootnoteRef' href='#fn:13'>
|
740
|
+
<sup>13</sup>
|
741
|
+
</a>
|
742
|
+
</h1>
|
743
|
+
<div id='N'>
|
744
|
+
<h2>
|
745
|
+
5.1.  Introduction
|
746
|
+
<a class='FootnoteRef' href='#fn:1'>
|
747
|
+
<sup>1</sup>
|
748
|
+
</a>
|
749
|
+
</h2>
|
750
|
+
</div>
|
751
|
+
<div id='O'>
|
752
|
+
<h2>
|
753
|
+
5.2.  Clause 4.2
|
754
|
+
<a class='FootnoteRef' href='#fn:14'>
|
755
|
+
<sup>14</sup>
|
756
|
+
</a>
|
757
|
+
</h2>
|
758
|
+
</div>
|
759
|
+
<div id='O1'>
|
760
|
+
<h2>5.3.  </h2>
|
761
|
+
</div>
|
762
|
+
</div>
|
763
|
+
<br/>
|
764
|
+
<div id='P' class='Section3'>
|
765
|
+
<h1 class='Annex'>
|
766
|
+
<b>Annex A</b>
|
767
|
+
<br/>
|
768
|
+
(normative)
|
769
|
+
<br/>
|
770
|
+
<br/>
|
771
|
+
<b>
|
772
|
+
Annex
|
773
|
+
<a class='FootnoteRef' href='#fn:15'>
|
774
|
+
<sup>15</sup>
|
775
|
+
</a>
|
776
|
+
</b>
|
777
|
+
</h1>
|
778
|
+
<div id='Q'>
|
779
|
+
<h2>
|
780
|
+
A.1.  Annex A.1
|
781
|
+
<a class='FootnoteRef' href='#fn:16'>
|
782
|
+
<sup>16</sup>
|
783
|
+
</a>
|
784
|
+
</h2>
|
785
|
+
<div id='Q1'>
|
786
|
+
<h3>
|
787
|
+
A.1.1.  Annex A.1a
|
788
|
+
<a class='FootnoteRef' href='#fn:17'>
|
789
|
+
<sup>17</sup>
|
790
|
+
</a>
|
791
|
+
</h3>
|
792
|
+
</div>
|
793
|
+
<div>
|
794
|
+
<h3>
|
795
|
+
A.1.2.  Annex Bibliography
|
796
|
+
<a class='FootnoteRef' href='#fn:18'>
|
797
|
+
<sup>18</sup>
|
798
|
+
</a>
|
799
|
+
</h3>
|
800
|
+
</div>
|
801
|
+
</div>
|
802
|
+
</div>
|
803
|
+
<br/>
|
804
|
+
<div>
|
805
|
+
<h1 class='Section3'>Bibliography</h1>
|
806
|
+
<div>
|
807
|
+
<h2 class='Section3'>Bibliography SubsectionA</h2>
|
808
|
+
</div>
|
809
|
+
</div>
|
810
|
+
</div>
|
811
|
+
</body>
|
812
|
+
</html>
|
791
813
|
OUTPUT
|
792
814
|
end
|
793
815
|
|
@@ -845,11 +867,11 @@ OUTPUT
|
|
845
867
|
<title>Annex A.1a</title>
|
846
868
|
</clause>
|
847
869
|
</clause>
|
848
|
-
</annex><bibliography><references id="R" obligation="informative">
|
870
|
+
</annex><bibliography><references id="R" obligation="informative" normative="true">
|
849
871
|
<title>Normative References</title>
|
850
872
|
</references><clause id="S" obligation="informative">
|
851
873
|
<title>Bibliography</title>
|
852
|
-
<references id="T" obligation="informative">
|
874
|
+
<references id="T" obligation="informative" normative="false">
|
853
875
|
<title>Bibliography Subsection</title>
|
854
876
|
</references>
|
855
877
|
</clause>
|
@@ -989,6 +1011,7 @@ OUTPUT
|
|
989
1011
|
</clause>
|
990
1012
|
<clause id="O" inline-header="true" obligation="normative">
|
991
1013
|
<title>Clause 4.2</title>
|
1014
|
+
<p>ABC</p>
|
992
1015
|
</clause></clause>
|
993
1016
|
|
994
1017
|
</sections>
|
@@ -1002,7 +1025,8 @@ OUTPUT
|
|
1002
1025
|
<h2>1.1.  Introduction</h2>
|
1003
1026
|
</div>
|
1004
1027
|
<div id="O">
|
1005
|
-
<span class="zzMoveToFollowing"><b>1.2.  Clause 4.2 </b></span>
|
1028
|
+
<span class="zzMoveToFollowing"><b>1.2.  Clause 4.2  </b></span>
|
1029
|
+
<p>ABC</p>
|
1006
1030
|
</div>
|
1007
1031
|
</div>
|
1008
1032
|
</div>
|
@@ -1033,7 +1057,7 @@ OUTPUT
|
|
1033
1057
|
<h2>Introduction</h2>
|
1034
1058
|
</div>
|
1035
1059
|
<div id="O">
|
1036
|
-
<span class="zzMoveToFollowing"><b>Clause 4.2 </b></span>
|
1060
|
+
<span class="zzMoveToFollowing"><b>Clause 4.2  </b></span>
|
1037
1061
|
</div>
|
1038
1062
|
</div>
|
1039
1063
|
</div>
|