metanorma-mpfd 0.0.10 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/asciidoctor/mpfd/converter.rb +1 -1
- data/lib/asciidoctor/mpfd/isostandard.rng +81 -28
- data/lib/asciidoctor/mpfd/{rsd.rng → mpfd.rng} +0 -0
- data/lib/isodoc/mpfd/html/htmlstyle.scss +7 -0
- data/lib/isodoc/mpfd/html/rsd.scss +13 -0
- data/lib/isodoc/mpfd/html/wordstyle.scss +6 -90
- data/lib/isodoc/mpfd/html_convert.rb +4 -58
- data/lib/isodoc/mpfd/pdf_convert.rb +4 -58
- data/lib/isodoc/mpfd/word_convert.rb +3 -7
- data/lib/metanorma/mpfd/processor.rb +2 -2
- data/lib/metanorma/mpfd/version.rb +1 -1
- data/metanorma-mpfd.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dfc1b89acbeb299bef9437ea614dd60ffb37dae39c15cfb97bfe6c6f10dd96d9
|
|
4
|
+
data.tar.gz: 613740b76c6fb47a0a2f0d3169211dddd067457f9ddbc4f88bd1a7482125a5bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 753b6939a96a5f666b6540ffbce379d26d5200530dc2b3a4a81e8eda2df343c51a890dead4c455723392191a481a7f83e8a8fc2a39d5e3e9765e77da91b87ade
|
|
7
|
+
data.tar.gz: e72ba32a437526c8e047bddadde880a37a34a836d8b20cd2a7601e96232d3591ed3319633e1452775e788b6afaf4e98ad3c56f206b903e2ad2d4521b3c6c550b
|
|
@@ -132,7 +132,7 @@ module Asciidoctor
|
|
|
132
132
|
def validate(doc)
|
|
133
133
|
content_validate(doc)
|
|
134
134
|
schema_validate(formattedstr_strip(doc.dup),
|
|
135
|
-
File.join(File.dirname(__FILE__), "
|
|
135
|
+
File.join(File.dirname(__FILE__), "mpfd.rng"))
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
def rsd_html_path(file)
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
<!-- add type to docidentifier in isodoc? -->
|
|
21
21
|
<define name="docidentifier">
|
|
22
22
|
<element name="docidentifier">
|
|
23
|
+
<optional>
|
|
24
|
+
<attribute name="type"/>
|
|
25
|
+
</optional>
|
|
23
26
|
<choice>
|
|
24
27
|
<text/>
|
|
25
28
|
<group>
|
|
@@ -66,6 +69,9 @@
|
|
|
66
69
|
<ref name="BibItemType"/>
|
|
67
70
|
</attribute>
|
|
68
71
|
</optional>
|
|
72
|
+
<optional>
|
|
73
|
+
<ref name="fetched"/>
|
|
74
|
+
</optional>
|
|
69
75
|
<choice>
|
|
70
76
|
<oneOrMore>
|
|
71
77
|
<ref name="btitle"/>
|
|
@@ -108,6 +114,27 @@
|
|
|
108
114
|
<zeroOrMore>
|
|
109
115
|
<ref name="docrelation"/>
|
|
110
116
|
</zeroOrMore>
|
|
117
|
+
<zeroOrMore>
|
|
118
|
+
<ref name="series"/>
|
|
119
|
+
</zeroOrMore>
|
|
120
|
+
<optional>
|
|
121
|
+
<ref name="medium"/>
|
|
122
|
+
</optional>
|
|
123
|
+
<zeroOrMore>
|
|
124
|
+
<ref name="bplace"/>
|
|
125
|
+
</zeroOrMore>
|
|
126
|
+
<zeroOrMore>
|
|
127
|
+
<ref name="extent"/>
|
|
128
|
+
</zeroOrMore>
|
|
129
|
+
<zeroOrMore>
|
|
130
|
+
<ref name="accesslocation"/>
|
|
131
|
+
</zeroOrMore>
|
|
132
|
+
<optional>
|
|
133
|
+
<ref name="bclassification"/>
|
|
134
|
+
</optional>
|
|
135
|
+
<optional>
|
|
136
|
+
<ref name="validity"/>
|
|
137
|
+
</optional>
|
|
111
138
|
<optional>
|
|
112
139
|
<ref name="editorialgroup"/>
|
|
113
140
|
</optional>
|
|
@@ -164,6 +191,27 @@
|
|
|
164
191
|
<zeroOrMore>
|
|
165
192
|
<ref name="docrelation"/>
|
|
166
193
|
</zeroOrMore>
|
|
194
|
+
<zeroOrMore>
|
|
195
|
+
<ref name="series"/>
|
|
196
|
+
</zeroOrMore>
|
|
197
|
+
<optional>
|
|
198
|
+
<ref name="medium"/>
|
|
199
|
+
</optional>
|
|
200
|
+
<zeroOrMore>
|
|
201
|
+
<ref name="bplace"/>
|
|
202
|
+
</zeroOrMore>
|
|
203
|
+
<zeroOrMore>
|
|
204
|
+
<ref name="extent"/>
|
|
205
|
+
</zeroOrMore>
|
|
206
|
+
<zeroOrMore>
|
|
207
|
+
<ref name="accesslocation"/>
|
|
208
|
+
</zeroOrMore>
|
|
209
|
+
<optional>
|
|
210
|
+
<ref name="bclassification"/>
|
|
211
|
+
</optional>
|
|
212
|
+
<optional>
|
|
213
|
+
<ref name="validity"/>
|
|
214
|
+
</optional>
|
|
167
215
|
<ref name="editorialgroup"/>
|
|
168
216
|
<zeroOrMore>
|
|
169
217
|
<ref name="ics"/>
|
|
@@ -548,10 +596,17 @@
|
|
|
548
596
|
</define>
|
|
549
597
|
<define name="li">
|
|
550
598
|
<element name="li">
|
|
551
|
-
<
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
599
|
+
<group>
|
|
600
|
+
<optional>
|
|
601
|
+
<!-- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | quote | sourcecode | review | example )+ -->
|
|
602
|
+
<attribute name="id">
|
|
603
|
+
<data type="ID"/>
|
|
604
|
+
</attribute>
|
|
605
|
+
</optional>
|
|
606
|
+
<oneOrMore>
|
|
607
|
+
<ref name="BasicBlock"/>
|
|
608
|
+
</oneOrMore>
|
|
609
|
+
</group>
|
|
555
610
|
<!-- exclude figures? -->
|
|
556
611
|
</element>
|
|
557
612
|
</define>
|
|
@@ -681,6 +736,14 @@
|
|
|
681
736
|
<ref name="paragraph"/>
|
|
682
737
|
</element>
|
|
683
738
|
</define>
|
|
739
|
+
<define name="preface">
|
|
740
|
+
<element name="preface">
|
|
741
|
+
<ref name="foreword"/>
|
|
742
|
+
<optional>
|
|
743
|
+
<ref name="introduction"/>
|
|
744
|
+
</optional>
|
|
745
|
+
</element>
|
|
746
|
+
</define>
|
|
684
747
|
</include>
|
|
685
748
|
<!-- end overrides -->
|
|
686
749
|
<!--
|
|
@@ -706,14 +769,6 @@
|
|
|
706
769
|
<ref name="bibliography"/>
|
|
707
770
|
</element>
|
|
708
771
|
</define>
|
|
709
|
-
<define name="preface">
|
|
710
|
-
<element name="preface">
|
|
711
|
-
<ref name="foreword"/>
|
|
712
|
-
<optional>
|
|
713
|
-
<ref name="introduction"/>
|
|
714
|
-
</optional>
|
|
715
|
-
</element>
|
|
716
|
-
</define>
|
|
717
772
|
<define name="bibliography">
|
|
718
773
|
<element name="bibliography">
|
|
719
774
|
<oneOrMore>
|
|
@@ -736,13 +791,15 @@
|
|
|
736
791
|
</define>
|
|
737
792
|
<define name="editorialgroup">
|
|
738
793
|
<element name="editorialgroup">
|
|
739
|
-
<
|
|
740
|
-
|
|
794
|
+
<oneOrMore>
|
|
795
|
+
<ref name="technical-committee"/>
|
|
796
|
+
</oneOrMore>
|
|
797
|
+
<zeroOrMore>
|
|
741
798
|
<ref name="subcommittee"/>
|
|
742
|
-
</
|
|
743
|
-
<
|
|
799
|
+
</zeroOrMore>
|
|
800
|
+
<zeroOrMore>
|
|
744
801
|
<ref name="workgroup"/>
|
|
745
|
-
</
|
|
802
|
+
</zeroOrMore>
|
|
746
803
|
<optional>
|
|
747
804
|
<ref name="secretariat"/>
|
|
748
805
|
</optional>
|
|
@@ -859,7 +916,7 @@
|
|
|
859
916
|
</element>
|
|
860
917
|
</define>
|
|
861
918
|
<define name="allParts">
|
|
862
|
-
<element name="
|
|
919
|
+
<element name="allparts">
|
|
863
920
|
<data type="boolean"/>
|
|
864
921
|
</element>
|
|
865
922
|
</define>
|
|
@@ -947,17 +1004,13 @@
|
|
|
947
1004
|
<optional>
|
|
948
1005
|
<ref name="section-title"/>
|
|
949
1006
|
</optional>
|
|
950
|
-
<
|
|
951
|
-
<
|
|
1007
|
+
<zeroOrMore>
|
|
1008
|
+
<choice>
|
|
952
1009
|
<ref name="term-clause"/>
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
<ref name="definitions"/>
|
|
958
|
-
</choice>
|
|
959
|
-
</zeroOrMore>
|
|
960
|
-
</choice>
|
|
1010
|
+
<ref name="terms"/>
|
|
1011
|
+
<ref name="definitions"/>
|
|
1012
|
+
</choice>
|
|
1013
|
+
</zeroOrMore>
|
|
961
1014
|
</element>
|
|
962
1015
|
</define>
|
|
963
1016
|
<define name="reference-clause">
|
|
File without changes
|
|
@@ -535,6 +535,8 @@ table.MsoISOTable
|
|
|
535
535
|
mso-yfti-tbllook:480;
|
|
536
536
|
mso-border-insideh:.75pt solid windowtext;
|
|
537
537
|
mso-border-insidev:.75pt solid windowtext;
|
|
538
|
+
mso-table-anchor-vertical:paragraph;
|
|
539
|
+
mso-table-bspace:12.0pt;
|
|
538
540
|
font-size:10.0pt;
|
|
539
541
|
font-family:$bodyfont;}
|
|
540
542
|
table.MsoISOTable tr
|
|
@@ -561,6 +563,8 @@ table.MsoTableGrid
|
|
|
561
563
|
mso-para-margin:0cm;
|
|
562
564
|
mso-para-margin-bottom:.0001pt;
|
|
563
565
|
mso-pagination:widow-orphan;
|
|
566
|
+
mso-table-anchor-vertical:paragraph;
|
|
567
|
+
mso-table-bspace:12.0pt;
|
|
564
568
|
font-size:10.0pt;
|
|
565
569
|
font-family:$bodyfont;}
|
|
566
570
|
td { page-break-inside:avoid; }
|
|
@@ -617,6 +621,15 @@ p.example, li.example, div.example, td.example
|
|
|
617
621
|
mso-pagination:none;
|
|
618
622
|
font-size:10.0pt;
|
|
619
623
|
font-family:$bodyfont;}
|
|
624
|
+
|
|
625
|
+
table.example {
|
|
626
|
+
margin-bottom:12pt;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
td.example p.MsoListParagraph {
|
|
630
|
+
font-size: 10.0pt;
|
|
631
|
+
}
|
|
632
|
+
|
|
620
633
|
span.note_label, span.example_label, td.example_label, td.note_label
|
|
621
634
|
{
|
|
622
635
|
font-size: 10.0pt;
|
|
@@ -82,9 +82,8 @@ p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
|
|
|
82
82
|
mso-style-qformat:yes;
|
|
83
83
|
margin-top:0cm;
|
|
84
84
|
margin-right:0cm;
|
|
85
|
-
margin-bottom:0cm;
|
|
86
85
|
/* do not put in margin-left, it is specific to list level */
|
|
87
|
-
margin-bottom
|
|
86
|
+
margin-bottom:12.0pt;
|
|
88
87
|
mso-add-space:auto;
|
|
89
88
|
mso-pagination:widow-orphan;
|
|
90
89
|
font-size:10.5pt;
|
|
@@ -98,9 +97,8 @@ p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphC
|
|
|
98
97
|
mso-style-type:export-only;
|
|
99
98
|
margin-top:0cm;
|
|
100
99
|
margin-right:0cm;
|
|
101
|
-
margin-bottom:
|
|
100
|
+
margin-bottom:12.0pt;
|
|
102
101
|
/* do not put in margin-left, it is specific to list level */
|
|
103
|
-
margin-bottom:.0001pt;
|
|
104
102
|
mso-add-space:auto;
|
|
105
103
|
mso-pagination:widow-orphan;
|
|
106
104
|
font-size:10.5pt;
|
|
@@ -114,9 +112,8 @@ p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagrap
|
|
|
114
112
|
mso-style-type:export-only;
|
|
115
113
|
margin-top:0cm;
|
|
116
114
|
margin-right:0cm;
|
|
117
|
-
margin-bottom:
|
|
115
|
+
margin-bottom:12.0pt;
|
|
118
116
|
/* do not put in margin-left, it is specific to list level */
|
|
119
|
-
margin-bottom:.0001pt;
|
|
120
117
|
mso-add-space:auto;
|
|
121
118
|
mso-pagination:widow-orphan;
|
|
122
119
|
font-size:10.5pt;
|
|
@@ -130,9 +127,8 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
|
130
127
|
mso-style-type:export-only;
|
|
131
128
|
margin-top:0cm;
|
|
132
129
|
margin-right:0cm;
|
|
133
|
-
margin-bottom:0cm;
|
|
134
|
-
/* do not put in margin-left, it is specific to list level */
|
|
135
130
|
margin-bottom:12.0pt;
|
|
131
|
+
/* do not put in margin-left, it is specific to list level */
|
|
136
132
|
mso-add-space:auto;
|
|
137
133
|
mso-pagination:widow-orphan;
|
|
138
134
|
font-size:10.5pt;
|
|
@@ -280,19 +276,6 @@ a:visited, span.MsoHyperlinkFollowed
|
|
|
280
276
|
color:purple;
|
|
281
277
|
text-decoration:underline;
|
|
282
278
|
text-underline:single;}
|
|
283
|
-
p
|
|
284
|
-
{mso-style-priority:99;
|
|
285
|
-
mso-margin-top-alt:auto;
|
|
286
|
-
margin-right:0cm;
|
|
287
|
-
mso-margin-bottom-alt:auto;
|
|
288
|
-
margin-left:0cm;
|
|
289
|
-
mso-pagination:widow-orphan;
|
|
290
|
-
font-size:10.0pt;
|
|
291
|
-
font-family:$bodyfont;
|
|
292
|
-
mso-fareast-font-family:"MS Mincho";
|
|
293
|
-
mso-bidi-font-family:"Times New Roman";
|
|
294
|
-
mso-ansi-language:EN-US;
|
|
295
|
-
mso-fareast-language:EN-US;}
|
|
296
279
|
p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
|
|
297
280
|
{mso-style-noshow:yes;
|
|
298
281
|
mso-style-unhide:no;
|
|
@@ -318,75 +301,6 @@ p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
|
|
|
318
301
|
mso-fareast-font-family:"Times New Roman";
|
|
319
302
|
mso-ansi-language:EN-US;
|
|
320
303
|
mso-fareast-language:EN-US;}
|
|
321
|
-
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
|
|
322
|
-
{mso-style-priority:34;
|
|
323
|
-
mso-style-unhide:no;
|
|
324
|
-
mso-style-qformat:yes;
|
|
325
|
-
margin-top:0cm;
|
|
326
|
-
margin-right:0cm;
|
|
327
|
-
margin-bottom:12.0pt;
|
|
328
|
-
margin-left:36.0pt;
|
|
329
|
-
mso-add-space:auto;
|
|
330
|
-
mso-pagination:widow-orphan;
|
|
331
|
-
font-size:10.5pt;
|
|
332
|
-
mso-bidi-font-size:11.0pt;
|
|
333
|
-
font-family:"Arial",sans-serif;
|
|
334
|
-
mso-fareast-font-family:"Times New Roman";
|
|
335
|
-
mso-ansi-language:EN-US;
|
|
336
|
-
mso-fareast-language:EN-US;}
|
|
337
|
-
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
|
|
338
|
-
{mso-style-priority:34;
|
|
339
|
-
mso-style-unhide:no;
|
|
340
|
-
mso-style-qformat:yes;
|
|
341
|
-
mso-style-type:export-only;
|
|
342
|
-
margin-top:0cm;
|
|
343
|
-
margin-right:0cm;
|
|
344
|
-
margin-bottom:0cm;
|
|
345
|
-
margin-left:36.0pt;
|
|
346
|
-
margin-bottom:.0001pt;
|
|
347
|
-
mso-add-space:auto;
|
|
348
|
-
mso-pagination:widow-orphan;
|
|
349
|
-
font-size:10.5pt;
|
|
350
|
-
mso-bidi-font-size:11.0pt;
|
|
351
|
-
font-family:"Arial",sans-serif;
|
|
352
|
-
mso-fareast-font-family:"Times New Roman";
|
|
353
|
-
mso-ansi-language:EN-US;
|
|
354
|
-
mso-fareast-language:EN-US;}
|
|
355
|
-
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
|
|
356
|
-
{mso-style-priority:34;
|
|
357
|
-
mso-style-unhide:no;
|
|
358
|
-
mso-style-qformat:yes;
|
|
359
|
-
mso-style-type:export-only;
|
|
360
|
-
margin-top:0cm;
|
|
361
|
-
margin-right:0cm;
|
|
362
|
-
margin-bottom:0cm;
|
|
363
|
-
margin-left:36.0pt;
|
|
364
|
-
margin-bottom:.0001pt;
|
|
365
|
-
mso-add-space:auto;
|
|
366
|
-
mso-pagination:widow-orphan;
|
|
367
|
-
font-size:10.5pt;
|
|
368
|
-
mso-bidi-font-size:11.0pt;
|
|
369
|
-
font-family:"Arial",sans-serif;
|
|
370
|
-
mso-fareast-font-family:"Times New Roman";
|
|
371
|
-
mso-ansi-language:EN-US;
|
|
372
|
-
mso-fareast-language:EN-US;}
|
|
373
|
-
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
|
|
374
|
-
{mso-style-priority:34;
|
|
375
|
-
mso-style-unhide:no;
|
|
376
|
-
mso-style-qformat:yes;
|
|
377
|
-
mso-style-type:export-only;
|
|
378
|
-
margin-top:0cm;
|
|
379
|
-
margin-right:0cm;
|
|
380
|
-
margin-bottom:12.0pt;
|
|
381
|
-
margin-left:36.0pt;
|
|
382
|
-
mso-add-space:auto;
|
|
383
|
-
mso-pagination:widow-orphan;
|
|
384
|
-
font-size:10.5pt;
|
|
385
|
-
mso-bidi-font-size:11.0pt;
|
|
386
|
-
font-family:"Arial",sans-serif;
|
|
387
|
-
mso-fareast-font-family:"Times New Roman";
|
|
388
|
-
mso-ansi-language:EN-US;
|
|
389
|
-
mso-fareast-language:EN-US;}
|
|
390
304
|
span.blackgraphtxsidebar
|
|
391
305
|
{mso-style-name:blackgraphtxsidebar;
|
|
392
306
|
mso-style-unhide:no;
|
|
@@ -1172,6 +1086,8 @@ table.MsoNormalTable
|
|
|
1172
1086
|
mso-para-margin:0cm;
|
|
1173
1087
|
mso-para-margin-bottom:.0001pt;
|
|
1174
1088
|
mso-pagination:widow-orphan;
|
|
1089
|
+
mso-table-anchor-vertical:paragraph;
|
|
1090
|
+
mso-table-bspace:12.0pt;
|
|
1175
1091
|
font-size:10.0pt;
|
|
1176
1092
|
font-family:$bodyfont;}
|
|
1177
1093
|
br.section
|
|
@@ -74,16 +74,12 @@ module IsoDoc
|
|
|
74
74
|
def annex_name(annex, name, div)
|
|
75
75
|
div.h1 **{ class: "Annex" } do |t|
|
|
76
76
|
t << "#{get_anchors[annex['id']][:label]} "
|
|
77
|
-
t
|
|
77
|
+
t.b do |b|
|
|
78
|
+
name&.children&.each { |c2| parse(c2, b) }
|
|
79
|
+
end
|
|
78
80
|
end
|
|
79
81
|
end
|
|
80
82
|
|
|
81
|
-
def annex_name_lbl(clause, num)
|
|
82
|
-
obl = l10n("(#{@inform_annex_lbl})")
|
|
83
|
-
obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
|
|
84
|
-
l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
|
|
85
|
-
end
|
|
86
|
-
|
|
87
83
|
def pre_parse(node, out)
|
|
88
84
|
out.pre node.text # content.gsub(/</, "<").gsub(/>/, ">")
|
|
89
85
|
end
|
|
@@ -96,11 +92,6 @@ module IsoDoc
|
|
|
96
92
|
end
|
|
97
93
|
end
|
|
98
94
|
|
|
99
|
-
def i18n_init(lang, script)
|
|
100
|
-
super
|
|
101
|
-
@annex_lbl = "Appendix"
|
|
102
|
-
end
|
|
103
|
-
|
|
104
95
|
def error_parse(node, out)
|
|
105
96
|
# catch elements not defined in ISO
|
|
106
97
|
case node.name
|
|
@@ -122,52 +113,6 @@ module IsoDoc
|
|
|
122
113
|
super
|
|
123
114
|
end
|
|
124
115
|
|
|
125
|
-
def annex_name(annex, name, div)
|
|
126
|
-
div.h1 **{ class: "Annex" } do |t|
|
|
127
|
-
t << "#{get_anchors[annex['id']][:label]} "
|
|
128
|
-
t << "<b>#{name.text}</b>"
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
def annex_name_lbl(clause, num)
|
|
133
|
-
obl = l10n("(#{@inform_annex_lbl})")
|
|
134
|
-
obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
|
|
135
|
-
l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
def pre_parse(node, out)
|
|
139
|
-
out.pre node.text # content.gsub(/</, "<").gsub(/>/, ">")
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
def term_defs_boilerplate(div, source, term, preface)
|
|
143
|
-
if source.empty? && term.nil?
|
|
144
|
-
div << @no_terms_boilerplate
|
|
145
|
-
else
|
|
146
|
-
div << term_defs_boilerplate_cont(source, term)
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
def i18n_init(lang, script)
|
|
151
|
-
super
|
|
152
|
-
@annex_lbl = "Appendix"
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
def error_parse(node, out)
|
|
156
|
-
# catch elements not defined in ISO
|
|
157
|
-
case node.name
|
|
158
|
-
when "pre"
|
|
159
|
-
pre_parse(node, out)
|
|
160
|
-
when "keyword"
|
|
161
|
-
out.span node.text, **{ class: "keyword" }
|
|
162
|
-
else
|
|
163
|
-
super
|
|
164
|
-
end
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
def fileloc(loc)
|
|
168
|
-
File.join(File.dirname(__FILE__), loc)
|
|
169
|
-
end
|
|
170
|
-
|
|
171
116
|
def i18n_init(lang, script)
|
|
172
117
|
super
|
|
173
118
|
y = if lang == "en"
|
|
@@ -178,6 +123,7 @@ module IsoDoc
|
|
|
178
123
|
else
|
|
179
124
|
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-zh-Hans.yaml"))
|
|
180
125
|
end
|
|
126
|
+
@annex_lbl = "Appendix"
|
|
181
127
|
@labels = @labels.merge(y)
|
|
182
128
|
@clause_lbl = y["clause"]
|
|
183
129
|
end
|
|
@@ -72,16 +72,12 @@ module IsoDoc
|
|
|
72
72
|
def annex_name(annex, name, div)
|
|
73
73
|
div.h1 **{ class: "Annex" } do |t|
|
|
74
74
|
t << "#{get_anchors[annex['id']][:label]} "
|
|
75
|
-
t
|
|
75
|
+
t.b do |b|
|
|
76
|
+
name&.children&.each { |c2| parse(c2, b) }
|
|
77
|
+
end
|
|
76
78
|
end
|
|
77
79
|
end
|
|
78
80
|
|
|
79
|
-
def annex_name_lbl(clause, num)
|
|
80
|
-
obl = l10n("(#{@inform_annex_lbl})")
|
|
81
|
-
obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
|
|
82
|
-
l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
|
|
83
|
-
end
|
|
84
|
-
|
|
85
81
|
def pre_parse(node, out)
|
|
86
82
|
out.pre node.text # content.gsub(/</, "<").gsub(/>/, ">")
|
|
87
83
|
end
|
|
@@ -94,11 +90,6 @@ module IsoDoc
|
|
|
94
90
|
end
|
|
95
91
|
end
|
|
96
92
|
|
|
97
|
-
def i18n_init(lang, script)
|
|
98
|
-
super
|
|
99
|
-
@annex_lbl = "Appendix"
|
|
100
|
-
end
|
|
101
|
-
|
|
102
93
|
def error_parse(node, out)
|
|
103
94
|
# catch elements not defined in ISO
|
|
104
95
|
case node.name
|
|
@@ -120,52 +111,6 @@ module IsoDoc
|
|
|
120
111
|
super
|
|
121
112
|
end
|
|
122
113
|
|
|
123
|
-
def annex_name(annex, name, div)
|
|
124
|
-
div.h1 **{ class: "Annex" } do |t|
|
|
125
|
-
t << "#{get_anchors[annex['id']][:label]} "
|
|
126
|
-
t << "<b>#{name.text}</b>"
|
|
127
|
-
end
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
def annex_name_lbl(clause, num)
|
|
131
|
-
obl = l10n("(#{@inform_annex_lbl})")
|
|
132
|
-
obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
|
|
133
|
-
l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
def pre_parse(node, out)
|
|
137
|
-
out.pre node.text # content.gsub(/</, "<").gsub(/>/, ">")
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
def term_defs_boilerplate(div, source, term, preface)
|
|
141
|
-
if source.empty? && term.nil?
|
|
142
|
-
div << @no_terms_boilerplate
|
|
143
|
-
else
|
|
144
|
-
div << term_defs_boilerplate_cont(source, term)
|
|
145
|
-
end
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
def i18n_init(lang, script)
|
|
149
|
-
super
|
|
150
|
-
@annex_lbl = "Appendix"
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
def error_parse(node, out)
|
|
154
|
-
# catch elements not defined in ISO
|
|
155
|
-
case node.name
|
|
156
|
-
when "pre"
|
|
157
|
-
pre_parse(node, out)
|
|
158
|
-
when "keyword"
|
|
159
|
-
out.span node.text, **{ class: "keyword" }
|
|
160
|
-
else
|
|
161
|
-
super
|
|
162
|
-
end
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
def fileloc(loc)
|
|
166
|
-
File.join(File.dirname(__FILE__), loc)
|
|
167
|
-
end
|
|
168
|
-
|
|
169
114
|
def i18n_init(lang, script)
|
|
170
115
|
super
|
|
171
116
|
y = if lang == "en"
|
|
@@ -176,6 +121,7 @@ module IsoDoc
|
|
|
176
121
|
else
|
|
177
122
|
YAML.load_file(File.join(File.dirname(__FILE__), "i18n-zh-Hans.yaml"))
|
|
178
123
|
end
|
|
124
|
+
@annex_lbl = "Appendix"
|
|
179
125
|
@labels = @labels.merge(y)
|
|
180
126
|
@clause_lbl = y["clause"]
|
|
181
127
|
end
|
|
@@ -103,16 +103,12 @@ module IsoDoc
|
|
|
103
103
|
def annex_name(annex, name, div)
|
|
104
104
|
div.h1 **{ class: "Annex" } do |t|
|
|
105
105
|
t << "#{get_anchors[annex['id']][:label]} "
|
|
106
|
-
t
|
|
106
|
+
t.b do |b|
|
|
107
|
+
name&.children&.each { |c2| parse(c2, b) }
|
|
108
|
+
end
|
|
107
109
|
end
|
|
108
110
|
end
|
|
109
111
|
|
|
110
|
-
def annex_name_lbl(clause, num)
|
|
111
|
-
obl = l10n("(#{@inform_annex_lbl})")
|
|
112
|
-
obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
|
|
113
|
-
l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
|
|
114
|
-
end
|
|
115
|
-
|
|
116
112
|
def pre_parse(node, out)
|
|
117
113
|
out.pre node.text # content.gsub(/</, "<").gsub(/>/, ">")
|
|
118
114
|
end
|
|
@@ -22,8 +22,8 @@ module Metanorma
|
|
|
22
22
|
"Metanorma::Mpfd #{Metanorma::Mpfd::VERSION}"
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
def input_to_isodoc(file)
|
|
26
|
-
Metanorma::Input::Asciidoc.new.process(file, @asciidoctor_backend)
|
|
25
|
+
def input_to_isodoc(file, filename)
|
|
26
|
+
Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def output(isodoc_node, outname, format, options={})
|
data/metanorma-mpfd.gemspec
CHANGED
|
@@ -42,5 +42,5 @@ Gem::Specification.new do |spec|
|
|
|
42
42
|
spec.add_development_dependency "rubocop", "~> 0.50"
|
|
43
43
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
|
44
44
|
spec.add_development_dependency "timecop", "~> 0.9"
|
|
45
|
-
spec.add_development_dependency "metanorma", "~> 0.
|
|
45
|
+
spec.add_development_dependency "metanorma", "~> 0.3.0"
|
|
46
46
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-mpfd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-10-
|
|
11
|
+
date: 2018-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|
|
@@ -240,14 +240,14 @@ dependencies:
|
|
|
240
240
|
requirements:
|
|
241
241
|
- - "~>"
|
|
242
242
|
- !ruby/object:Gem::Version
|
|
243
|
-
version: 0.
|
|
243
|
+
version: 0.3.0
|
|
244
244
|
type: :development
|
|
245
245
|
prerelease: false
|
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
|
247
247
|
requirements:
|
|
248
248
|
- - "~>"
|
|
249
249
|
- !ruby/object:Gem::Version
|
|
250
|
-
version: 0.
|
|
250
|
+
version: 0.3.0
|
|
251
251
|
description: |
|
|
252
252
|
metanorma-mpfd lets you write MPF documents in AsciiDoc syntax.
|
|
253
253
|
|
|
@@ -274,8 +274,8 @@ files:
|
|
|
274
274
|
- lib/asciidoctor/mpfd/converter.rb
|
|
275
275
|
- lib/asciidoctor/mpfd/isodoc.rng
|
|
276
276
|
- lib/asciidoctor/mpfd/isostandard.rng
|
|
277
|
+
- lib/asciidoctor/mpfd/mpfd.rng
|
|
277
278
|
- lib/asciidoctor/mpfd/pdf.js
|
|
278
|
-
- lib/asciidoctor/mpfd/rsd.rng
|
|
279
279
|
- lib/asciidoctor/mpfd/section.rb
|
|
280
280
|
- lib/isodoc/mpfd/html/header.html
|
|
281
281
|
- lib/isodoc/mpfd/html/html_rsd_intro.html
|