metanorma-ribose 2.8.0 → 2.8.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b99fb4ebc43521b4eb7840a22c856307b48f6a7a95363779bb1f2a01f0da053d
4
- data.tar.gz: 992a6e689b5997b04284ca030ac754e3cfd3b2ea3f966e46047cc9029d61cf04
3
+ metadata.gz: d0bd3dfdc7c8e1fa480a67bfed8b12b902f4f3aec39330c04316ba6aee526dc5
4
+ data.tar.gz: f8ae40d15422184e3f4d5746f31fa5a54c2bb8f323747a5a84cb04f07e1b37ff
5
5
  SHA512:
6
- metadata.gz: 13913d8b99c512232bd50275d222eba6043000d8844e9e304997c54ddba2fa309e38ce8a19796cc4c42cbfe418f598e86f9543d1b1aa1c712cc7b52dfb8fbf1e
7
- data.tar.gz: e9510124eb02b62fdba5ab55e208f6bc55f12e3394b503c4526b33808fd26d4051177c68bc36f3a988b24379e0a863c3c016792c73a99f2703f24de0033c5e49
6
+ metadata.gz: 200daf8c84ade837bf5bdcde6ffd06283960b6b561479bd5bf7015199ac329f8baa83c9fa1dda3a5a4a2717af6723a64e71680890fe9f6374240b267871c04b4
7
+ data.tar.gz: aa32f27c72fd0838a26f446c4768c0334bc1a1839e13e5cda889302f00f08a98b03b79d38a4d5264054883ee0d610d583a330e855419f8b966726dc0f54d0449
@@ -662,26 +662,26 @@ main {
662
662
  margin: 0;
663
663
  }
664
664
  }
665
- div.figure .FigureTitle, div.figure .figure-title {
665
+ figure figcaption {
666
666
  font-weight: 700;
667
667
  font-size: 1em;
668
668
  text-align: center;
669
669
  }
670
- div.figure > img, div.figure > svg {
670
+ figure > img, figure > svg {
671
671
  margin-left: auto;
672
672
  margin-right: auto;
673
673
  display: block;
674
674
  max-width: 100%;
675
675
  height: auto;
676
676
  }
677
- div.figure {
677
+ figure {
678
678
  line-height: 1.6em;
679
679
  padding: 1.5em;
680
680
  margin: 2em 0 1em 0;
681
681
  overflow: auto;
682
682
  }
683
683
 
684
- table div.figure {
684
+ table figure {
685
685
  padding: 0;
686
686
  margin: 0;
687
687
  }
@@ -1021,17 +1021,21 @@ p.NormRef, div.Biblio, div.NormRef {
1021
1021
  margin-left: 2em;
1022
1022
  }
1023
1023
 
1024
+ .Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
1025
+ margin-left: 3em;
1026
+ }
1027
+
1024
1028
  /*
1025
1029
  3.6 Source Code + figures
1026
1030
  */
1027
- .figure .SourceTitle,
1031
+ figure .SourceTitle,
1028
1032
  pre .SourceTitle,
1029
1033
  .pseudocode .SourceTitle {
1030
1034
  font-weight: 700;
1031
1035
  font-size: 1em;
1032
1036
  text-align: center;
1033
1037
  }
1034
- .figure,
1038
+ figure,
1035
1039
  pre,
1036
1040
  .pseudocode {
1037
1041
  background-color: #f7f7f7;
@@ -1066,7 +1070,7 @@ pre {
1066
1070
  text-align: left;
1067
1071
  }
1068
1072
 
1069
- .FigureTitle,
1073
+ figcaption,
1070
1074
  .SourceTitle {
1071
1075
  font-weight: 700;
1072
1076
  font-size: 1em;
@@ -1151,7 +1155,7 @@ table table.plain, table table.plain th, table table.plain td {
1151
1155
  font-size: 0.95em;
1152
1156
  }
1153
1157
 
1154
- p.TableTitle {
1158
+ table > caption {
1155
1159
  text-align: center;
1156
1160
  margin-top: 2.5em;
1157
1161
  font-weight: 400;
@@ -1401,7 +1405,7 @@ To top button
1401
1405
  margin-top: 1.2em;
1402
1406
  }
1403
1407
  .note,
1404
- .figure,
1408
+ figure,
1405
1409
  pre,
1406
1410
  .pseudocode,
1407
1411
  table {
@@ -88,11 +88,11 @@ nav {
88
88
  }
89
89
  }
90
90
 
91
- div.figure {
91
+ figure {
92
92
  @include figureBlock();
93
93
  }
94
94
 
95
- table div.figure {
95
+ table figure {
96
96
  padding: 0;
97
97
  margin: 0;
98
98
  }
@@ -353,11 +353,15 @@ p.NormRef, div.Biblio, div.NormRef {
353
353
  margin-left: 2em;
354
354
  }
355
355
 
356
+ .Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
357
+ margin-left: 3em;
358
+ }
359
+
356
360
  /*
357
361
  3.6 Source Code + figures
358
362
  */
359
363
 
360
- .figure,
364
+ figure,
361
365
  pre,
362
366
  .pseudocode {
363
367
  @include pseudocodeBlock(#f7f7f7);
@@ -371,7 +375,7 @@ pre {
371
375
  @include recommendationBlock();
372
376
  @include listBlock();
373
377
 
374
- .FigureTitle,
378
+ figcaption,
375
379
  .SourceTitle {
376
380
  @include blockTitle()
377
381
  }
@@ -427,7 +431,7 @@ table {
427
431
  @include table(1px solid black);
428
432
  }
429
433
 
430
- p.TableTitle {
434
+ table > caption {
431
435
  text-align: center;
432
436
  margin-top: 2.5em;
433
437
  font-weight: 400;
@@ -698,7 +702,7 @@ To top button
698
702
  }
699
703
 
700
704
  .note,
701
- .figure,
705
+ figure,
702
706
  pre,
703
707
  .pseudocode,
704
708
  table {
@@ -29,6 +29,8 @@
29
29
 
30
30
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
31
31
 
32
+ <xsl:apply-templates select="//mn:indexsect" mode="contents"/>
33
+
32
34
  <xsl:call-template name="processTablesFigures_Contents"/>
33
35
  </mnx:contents>
34
36
  </xsl:variable>
@@ -63,20 +65,25 @@
63
65
  <fo:region-end extent="78mm"/>
64
66
  </fo:simple-page-master>
65
67
 
68
+ <xsl:variable name="extent_header">14mm</xsl:variable>
69
+ <xsl:variable name="extent_footer">12.5mm</xsl:variable>
70
+ <xsl:variable name="extent_left">13mm</xsl:variable>
71
+ <xsl:variable name="extent_right">12mm</xsl:variable>
72
+
66
73
  <!-- ToC -->
67
74
  <fo:simple-page-master master-name="toc-odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
68
75
  <fo:region-body margin-top="14mm" margin-bottom="26.5mm" margin-left="61mm" margin-right="12mm"/>
69
- <fo:region-before region-name="header-toc-odd" extent="14mm"/>
70
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
71
- <fo:region-start region-name="left-region" extent="13mm"/>
72
- <fo:region-end region-name="right-region" extent="12mm"/>
76
+ <fo:region-before region-name="header-toc-odd" extent="{$extent_header}"/>
77
+ <fo:region-after region-name="footer-odd" extent="{$extent_footer}"/>
78
+ <fo:region-start region-name="left-region" extent="{$extent_left}"/>
79
+ <fo:region-end region-name="right-region" extent="{$extent_right}"/>
73
80
  </fo:simple-page-master>
74
81
  <fo:simple-page-master master-name="toc-even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
75
82
  <fo:region-body margin-top="14mm" margin-bottom="85mm" margin-left="61mm" margin-right="12mm"/>
76
- <fo:region-before region-name="header-toc-even" extent="14mm"/>
77
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
78
- <fo:region-start region-name="left-region" extent="13mm"/>
79
- <fo:region-end region-name="right-region" extent="12mm"/>
83
+ <fo:region-before region-name="header-toc-even" extent="{$extent_header}"/>
84
+ <fo:region-after region-name="footer-even" extent="{$extent_footer}"/>
85
+ <fo:region-start region-name="left-region" extent="{$extent_left}"/>
86
+ <fo:region-end region-name="right-region" extent="{$extent_right}"/>
80
87
  </fo:simple-page-master>
81
88
  <fo:page-sequence-master master-name="toc">
82
89
  <fo:repeatable-page-master-alternatives>
@@ -87,196 +94,59 @@
87
94
 
88
95
  <fo:simple-page-master master-name="first" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
89
96
  <fo:region-body margin-top="14mm" margin-bottom="85mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
90
- <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
91
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
92
- <fo:region-start region-name="left-region" extent="13mm"/>
93
- <fo:region-end region-name="right-region" extent="12mm"/>
94
- </fo:simple-page-master>
95
-
96
- <xsl:variable name="pages">
97
- <!-- Page 2 and 3: (left bottom + right top, yellow) -->
98
- <fo:simple-page-master master-name="page2" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
99
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
100
- <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
101
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
102
- <fo:region-start region-name="left-region" extent="13mm"/>
103
- <fo:region-end region-name="right-region" extent="12mm"/>
104
- </fo:simple-page-master>
105
- <fo:simple-page-master master-name="page3" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
106
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
107
- <fo:region-before region-name="header-RT-yellow" extent="14mm"/>
108
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
109
- <fo:region-start region-name="left-region" extent="13mm"/>
110
- <fo:region-end region-name="right-region" extent="12mm"/>
111
- </fo:simple-page-master>
112
-
113
- <!-- Page 4 and 5: (left top + right bottom, blue) -->
114
- <fo:simple-page-master master-name="page4" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
115
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
116
- <fo:region-before region-name="header-LT-blue" extent="14mm"/>
117
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
118
- <fo:region-start region-name="left-region" extent="13mm"/>
119
- <fo:region-end region-name="right-region" extent="12mm"/>
120
- </fo:simple-page-master>
121
- <fo:simple-page-master master-name="page5" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
122
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
123
- <fo:region-before region-name="header-RB-blue" extent="14mm"/>
124
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
125
- <fo:region-start region-name="left-region" extent="13mm"/>
126
- <fo:region-end region-name="right-region" extent="12mm"/>
127
- </fo:simple-page-master>
128
-
129
- <!-- Page 6 and 7: (left bottom + right top, orange) -->
130
- <fo:simple-page-master master-name="page6" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
131
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
132
- <fo:region-before region-name="header-LB-orange" extent="14mm"/>
133
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
134
- <fo:region-start region-name="left-region" extent="13mm"/>
135
- <fo:region-end region-name="right-region" extent="12mm"/>
136
- </fo:simple-page-master>
137
- <fo:simple-page-master master-name="page7" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
138
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
139
- <fo:region-before region-name="header-RT-orange" extent="14mm"/>
140
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
141
- <fo:region-start region-name="left-region" extent="13mm"/>
142
- <fo:region-end region-name="right-region" extent="12mm"/>
143
- </fo:simple-page-master>
144
-
145
- <!-- Page 8 and 9: (left top + right bottom, yellow) -->
146
- <fo:simple-page-master master-name="page8" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
147
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
148
- <fo:region-before region-name="header-LT-yellow" extent="14mm"/>
149
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
150
- <fo:region-start region-name="left-region" extent="13mm"/>
151
- <fo:region-end region-name="right-region" extent="12mm"/>
152
- </fo:simple-page-master>
153
- <fo:simple-page-master master-name="page9" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
154
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
155
- <fo:region-before region-name="header-RB-yellow" extent="14mm"/>
156
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
157
- <fo:region-start region-name="left-region" extent="13mm"/>
158
- <fo:region-end region-name="right-region" extent="12mm"/>
159
- </fo:simple-page-master>
160
-
161
- <fo:simple-page-master master-name="page10" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
162
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
163
- <fo:region-before region-name="header-LB-blue" extent="14mm"/>
164
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
165
- <fo:region-start region-name="left-region" extent="13mm"/>
166
- <fo:region-end region-name="right-region" extent="12mm"/>
167
- </fo:simple-page-master>
168
- <fo:simple-page-master master-name="page11" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
169
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
170
- <fo:region-before region-name="header-RT-blue" extent="14mm"/>
171
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
172
- <fo:region-start region-name="left-region" extent="13mm"/>
173
- <fo:region-end region-name="right-region" extent="12mm"/>
97
+ <fo:region-before region-name="header-LB-yellow" extent="{$extent_header}"/>
98
+ <fo:region-after region-name="footer-even" extent="{$extent_footer}"/>
99
+ <fo:region-start region-name="left-region" extent="{$extent_left}"/>
100
+ <fo:region-end region-name="right-region" extent="{$extent_right}"/>
174
101
  </fo:simple-page-master>
175
102
 
176
- <fo:simple-page-master master-name="page12" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
177
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
178
- <fo:region-before region-name="header-LT-orange" extent="14mm"/>
179
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
180
- <fo:region-start region-name="left-region" extent="13mm"/>
181
- <fo:region-end region-name="right-region" extent="12mm"/>
182
- </fo:simple-page-master>
183
- <fo:simple-page-master master-name="page13" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
184
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
185
- <fo:region-before region-name="header-RB-orange" extent="14mm"/>
186
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
187
- <fo:region-start region-name="left-region" extent="13mm"/>
188
- <fo:region-end region-name="right-region" extent="12mm"/>
189
- </fo:simple-page-master>
190
-
191
- <fo:simple-page-master master-name="page14" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
192
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
193
- <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
194
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
195
- <fo:region-start region-name="left-region" extent="13mm"/>
196
- <fo:region-end region-name="right-region" extent="12mm"/>
197
- </fo:simple-page-master>
198
- <fo:simple-page-master master-name="page15" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
199
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
200
- <fo:region-before region-name="header-RT-yellow" extent="14mm"/>
201
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
202
- <fo:region-start region-name="left-region" extent="13mm"/>
203
- <fo:region-end region-name="right-region" extent="12mm"/>
204
- </fo:simple-page-master>
205
-
206
- <fo:simple-page-master master-name="page16" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
207
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
208
- <fo:region-before region-name="header-LT-blue" extent="14mm"/>
209
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
210
- <fo:region-start region-name="left-region" extent="13mm"/>
211
- <fo:region-end region-name="right-region" extent="12mm"/>
212
- </fo:simple-page-master>
213
- <fo:simple-page-master master-name="page17" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
214
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
215
- <fo:region-before region-name="header-RB-blue" extent="14mm"/>
216
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
217
- <fo:region-start region-name="left-region" extent="13mm"/>
218
- <fo:region-end region-name="right-region" extent="12mm"/>
219
- </fo:simple-page-master>
220
-
221
- <fo:simple-page-master master-name="page18" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
222
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
223
- <fo:region-before region-name="header-LB-orange" extent="14mm"/>
224
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
225
- <fo:region-start region-name="left-region" extent="13mm"/>
226
- <fo:region-end region-name="right-region" extent="12mm"/>
227
- </fo:simple-page-master>
228
- <fo:simple-page-master master-name="page19" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
229
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
230
- <fo:region-before region-name="header-RT-orange" extent="14mm"/>
231
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
232
- <fo:region-start region-name="left-region" extent="13mm"/>
233
- <fo:region-end region-name="right-region" extent="12mm"/>
234
- </fo:simple-page-master>
235
-
236
- <fo:simple-page-master master-name="page20" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
237
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
238
- <fo:region-before region-name="header-LT-yellow" extent="14mm"/>
239
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
240
- <fo:region-start region-name="left-region" extent="13mm"/>
241
- <fo:region-end region-name="right-region" extent="12mm"/>
242
- </fo:simple-page-master>
243
- <fo:simple-page-master master-name="page21" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
244
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
245
- <fo:region-before region-name="header-RB-yellow" extent="14mm"/>
246
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
247
- <fo:region-start region-name="left-region" extent="13mm"/>
248
- <fo:region-end region-name="right-region" extent="12mm"/>
249
- </fo:simple-page-master>
250
-
251
- <fo:simple-page-master master-name="page22" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
252
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
253
- <fo:region-before region-name="header-LB-blue" extent="14mm"/>
254
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
255
- <fo:region-start region-name="left-region" extent="13mm"/>
256
- <fo:region-end region-name="right-region" extent="12mm"/>
257
- </fo:simple-page-master>
258
- <fo:simple-page-master master-name="page23" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
259
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
260
- <fo:region-before region-name="header-RT-blue" extent="14mm"/>
261
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
262
- <fo:region-start region-name="left-region" extent="13mm"/>
263
- <fo:region-end region-name="right-region" extent="12mm"/>
264
- </fo:simple-page-master>
103
+ <xsl:variable name="dict_page_region">
104
+ <!-- Page 2 and 3: (left bottom + right top, yellow) -->
105
+ <item page="2" odd_even="even">LB-yellow</item>
106
+ <item page="3">RT-yellow</item>
107
+ <!-- Page 4 and 5: (left top + right bottom, blue) -->
108
+ <item page="4">LT-blue</item>
109
+ <item page="5">RB-blue</item>
110
+ <!-- Page 6 and 7: (left bottom + right top, orange) -->
111
+ <item page="6">LB-orange</item>
112
+ <item page="7">RT-orange</item>
113
+ <!-- Page 8 and 9: (left top + right bottom, yellow) -->
114
+ <item page="8">LT-yellow</item>
115
+ <item page="9">RB-yellow</item>
116
+ <item page="10">LB-blue</item>
117
+ <item page="11">RT-blue</item>
118
+ <item page="12">LT-orange</item>
119
+ <item page="13">RB-orange</item>
120
+ <item page="14">LB-yellow</item>
121
+ <item page="15">RT-yellow</item>
122
+ <item page="16">LT-blue</item>
123
+ <item page="17">RB-blue</item>
124
+ <item page="18">LB-orange</item>
125
+ <item page="19">RT-orange</item>
126
+ <item page="20">LT-yellow</item>
127
+ <item page="21">RB-yellow</item>
128
+ <item page="22">LB-blue</item>
129
+ <item page="23">RT-blue</item>
130
+ <item page="24">LT-orange</item>
131
+ <item page="25">RB-orange</item>
132
+ </xsl:variable>
265
133
 
266
- <fo:simple-page-master master-name="page24" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
267
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
268
- <fo:region-before region-name="header-LT-orange" extent="14mm"/>
269
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
270
- <fo:region-start region-name="left-region" extent="13mm"/>
271
- <fo:region-end region-name="right-region" extent="12mm"/>
272
- </fo:simple-page-master>
273
- <fo:simple-page-master master-name="page25" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
274
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
275
- <fo:region-before region-name="header-RB-orange" extent="14mm"/>
276
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
277
- <fo:region-start region-name="left-region" extent="13mm"/>
278
- <fo:region-end region-name="right-region" extent="12mm"/>
279
- </fo:simple-page-master>
134
+ <xsl:variable name="pages">
135
+ <xsl:for-each select="xalan:nodeset($dict_page_region)/item">
136
+ <xsl:variable name="odd_even">
137
+ <xsl:choose>
138
+ <xsl:when test="number(@page) mod 2 = 1">odd</xsl:when>
139
+ <xsl:otherwise>even</xsl:otherwise>
140
+ </xsl:choose>
141
+ </xsl:variable>
142
+ <fo:simple-page-master master-name="page{@page}" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
143
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
144
+ <fo:region-before region-name="header-{.}" extent="{$extent_header}"/>
145
+ <fo:region-after region-name="footer-{$odd_even}" extent="{$extent_footer}"/>
146
+ <fo:region-start region-name="left-region" extent="{$extent_left}"/>
147
+ <fo:region-end region-name="right-region" extent="{$extent_right}"/>
148
+ </fo:simple-page-master>
149
+ </xsl:for-each>
280
150
  </xsl:variable>
281
151
  <xsl:copy-of select="$pages"/>
282
152
  <xsl:for-each select="xalan:nodeset($pages)/*">
@@ -305,6 +175,28 @@
305
175
  <fo:repeatable-page-master-reference master-reference="page2-landscape"/>
306
176
  </fo:page-sequence-master>
307
177
 
178
+ <!-- Index pages (two columns) -->
179
+ <fo:simple-page-master master-name="index-odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
180
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm" xsl:use-attribute-sets="indexsect-region-body-style"/>
181
+ <fo:region-before region-name="header" extent="{$extent_header}"/>
182
+ <fo:region-after region-name="footer-odd" extent="{$extent_footer}"/>
183
+ <fo:region-start region-name="left-region" extent="{$extent_left}"/>
184
+ <fo:region-end region-name="right-region" extent="{$extent_right}"/>
185
+ </fo:simple-page-master>
186
+ <fo:simple-page-master master-name="index-even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
187
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm" xsl:use-attribute-sets="indexsect-region-body-style"/>
188
+ <fo:region-before region-name="header" extent="{$extent_header}"/>
189
+ <fo:region-after region-name="footer-even" extent="{$extent_footer}"/>
190
+ <fo:region-start region-name="left-region" extent="{$extent_left}"/>
191
+ <fo:region-end region-name="right-region" extent="{$extent_right}"/>
192
+ </fo:simple-page-master>
193
+ <fo:page-sequence-master master-name="index">
194
+ <fo:repeatable-page-master-alternatives>
195
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="index-even"/>
196
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="index-odd"/>
197
+ </fo:repeatable-page-master-alternatives>
198
+ </fo:page-sequence-master>
199
+
308
200
  </fo:layout-master-set>
309
201
  </xsl:template> <!-- END: layout-master-set -->
310
202
 
@@ -410,7 +302,11 @@
410
302
  </fo:page-sequence>
411
303
  </xsl:for-each>
412
304
  </xsl:for-each>
413
- </xsl:for-each>
305
+
306
+ <!-- Index -->
307
+ <xsl:call-template name="index-pages"/>
308
+
309
+ </xsl:for-each> <!-- xalan:nodeset($updated_xml)/* -->
414
310
 
415
311
  <xsl:call-template name="back-page"/>
416
312
 
@@ -607,7 +503,7 @@
607
503
 
608
504
  <xsl:template name="insertListOf_Item">
609
505
  <fo:block xsl:use-attribute-sets="toc-listof-item-style">
610
- <fo:block text-align-last="justify">
506
+ <fo:block text-align-last="justify" role="Reference">
611
507
  <fo:basic-link internal-destination="{@id}">
612
508
  <xsl:call-template name="setAltText">
613
509
  <xsl:with-param name="value" select="@alt-text"/>
@@ -616,7 +512,7 @@
616
512
  <xsl:text>  </xsl:text>
617
513
  <fo:inline>
618
514
  <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
619
- <fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
515
+ <fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
620
516
  </fo:inline>
621
517
  </fo:basic-link>
622
518
  </fo:block>
@@ -640,17 +536,21 @@
640
536
 
641
537
  <xsl:call-template name="refine_toc-item-style"/>
642
538
 
643
- <fo:block text-align-last="justify">
644
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
645
- <xsl:value-of select="@section"/>
646
- <xsl:text> </xsl:text>
647
- <xsl:apply-templates select="mnx:title"/>
648
- <xsl:text>  </xsl:text>
649
- <fo:inline>
650
- <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
651
- <fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
652
- </fo:inline>
653
- </fo:basic-link>
539
+ <fo:block text-align-last="justify" role="SKIP">
540
+ <fo:inline role="Lbl"><xsl:value-of select="@section"/></fo:inline>
541
+ <fo:wrapper role="Reference">
542
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
543
+ <xsl:if test="@section != ''">
544
+ <xsl:text> </xsl:text>
545
+ </xsl:if>
546
+ <xsl:apply-templates select="mnx:title"/>
547
+ <xsl:text>  </xsl:text>
548
+ <fo:inline role="SKIP">
549
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
550
+ <fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
551
+ </fo:inline>
552
+ </fo:basic-link>
553
+ </fo:wrapper>
654
554
  </fo:block>
655
555
  </fo:block>
656
556
  </xsl:for-each>
@@ -749,15 +649,18 @@
749
649
  <xsl:call-template name="getName"/>
750
650
  </xsl:variable>
751
651
 
752
- <xsl:variable name="type">
753
- <xsl:value-of select="local-name()"/>
754
- </xsl:variable>
652
+ <xsl:variable name="type" select="local-name()"/>
755
653
 
756
654
  <mnx:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
655
+ <xsl:if test="$type = 'indexsect'">
656
+ <xsl:attribute name="level">1</xsl:attribute>
657
+ </xsl:if>
757
658
  <mnx:title>
758
659
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
759
660
  </mnx:title>
760
- <xsl:apply-templates mode="contents"/>
661
+ <xsl:if test="$type != 'indexsect'">
662
+ <xsl:apply-templates mode="contents"/>
663
+ </xsl:if>
761
664
  </mnx:item>
762
665
 
763
666
  </xsl:if>
@@ -2812,7 +2715,23 @@
2812
2715
  <xsl:sort select="@displayorder" data-type="number"/>
2813
2716
  <xsl:element name="page_sequence" namespace="{$namespace_full}">
2814
2717
  <xsl:attribute name="main_page_sequence"/>
2815
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2718
+
2719
+ <!-- from common <xsl:template name="index-pages"> -->
2720
+ <xsl:variable name="docid">
2721
+ <xsl:call-template name="getDocumentId"/>
2722
+ </xsl:variable>
2723
+
2724
+ <xsl:variable name="current_document_index_id">
2725
+ <xsl:apply-templates select="." mode="index_add_id">
2726
+ <xsl:with-param name="docid" select="$docid"/>
2727
+ </xsl:apply-templates>
2728
+ </xsl:variable>
2729
+ <xsl:variable name="current_document_index">
2730
+ <xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
2731
+ </xsl:variable>
2732
+
2733
+ <!-- xalan:nodeset($current_document_index) -->
2734
+ <xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="update_xml_step_move_pagebreak"/>
2816
2735
  </xsl:element>
2817
2736
  </xsl:for-each>
2818
2737
  </xsl:template>
@@ -3897,6 +3816,7 @@
3897
3816
  </xsl:template>
3898
3817
 
3899
3818
  <xsl:attribute-set name="tt-style">
3819
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3900
3820
  <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3901
3821
  </xsl:attribute-set>
3902
3822
 
@@ -5687,6 +5607,11 @@
5687
5607
  <!-- Display table's name before table as standalone block -->
5688
5608
  <!-- $namespace = 'iso' or -->
5689
5609
  <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
5610
+ <xsl:if test="not(mn:fmt-name)"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
5611
+ <xsl:apply-templates select="mn:name">
5612
+ <xsl:with-param name="process">true</xsl:with-param>
5613
+ </xsl:apply-templates>
5614
+ </xsl:if>
5690
5615
 
5691
5616
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
5692
5617
 
@@ -5934,7 +5859,13 @@
5934
5859
  </xsl:template>
5935
5860
 
5936
5861
  <!-- table/name-->
5937
- <xsl:template match="*[local-name()='table']/mn:fmt-name">
5862
+ <xsl:template match="mn:table[not(mn:fmt-name)]/mn:name"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
5863
+ <xsl:param name="process">false</xsl:param>
5864
+ <xsl:if test="$process = 'true'">
5865
+ <xsl:call-template name="table_name"/>
5866
+ </xsl:if>
5867
+ </xsl:template>
5868
+ <xsl:template match="*[local-name()='table']/mn:fmt-name" name="table_name">
5938
5869
  <xsl:param name="continued"/>
5939
5870
  <xsl:param name="cols-count"/>
5940
5871
  <xsl:if test="normalize-space() != ''">
@@ -6410,12 +6341,14 @@
6410
6341
  <xsl:param name="colwidths"/>
6411
6342
  <xsl:param name="colgroup"/>
6412
6343
 
6413
- <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
6344
+ <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or (..//mn:fn[not(parent::mn:fmt-name)] and not(ancestor::mn:table[1]//mn:tfoot//mn:fmt-footnote-container)) or ../mn:fmt-source or ../mn:p"/>
6345
+ <!-- in JIS fmt-footnote-container renders in tfoot, so no need render fn in the separate table -->
6414
6346
 
6415
- <xsl:variable name="isNoteOrFnExistShowAfterTable">
6347
+ <xsl:variable name="isNoteOrFnExistShowAfterTable_">
6416
6348
  </xsl:variable>
6349
+ <xsl:variable name="isNoteOrFnExistShowAfterTable" select="normalize-space($isNoteOrFnExistShowAfterTable_)"/>
6417
6350
 
6418
- <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
6351
+ <xsl:if test="$isNoteOrFnExist = 'true' or $isNoteOrFnExistShowAfterTable = 'true'">
6419
6352
 
6420
6353
  <xsl:variable name="cols-count">
6421
6354
  <xsl:choose>
@@ -8655,6 +8588,18 @@
8655
8588
  </xsl:with-param>
8656
8589
  </xsl:call-template>
8657
8590
  </xsl:template> <!-- xref -->
8591
+ <xsl:template match="mn:indexsect//mn:fmt-xref[@pagenumber = 'true']" priority="2">
8592
+ <xsl:call-template name="insert_basic_link">
8593
+ <xsl:with-param name="element">
8594
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
8595
+ <fo:inline>
8596
+ <xsl:copy-of select="@id"/>
8597
+ <fo:page-number-citation ref-id="{@target}"/>
8598
+ </fo:inline>
8599
+ </fo:basic-link>
8600
+ </xsl:with-param>
8601
+ </xsl:call-template>
8602
+ </xsl:template>
8658
8603
 
8659
8604
  <!-- command between two xref points to non-standard bibitem -->
8660
8605
  <xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']]]"><xsl:value-of select="."/>
@@ -12075,8 +12020,22 @@
12075
12020
  <!-- End Highlight syntax styles -->
12076
12021
 
12077
12022
  <!-- Index section styles -->
12023
+
12024
+ <xsl:attribute-set name="indexsect-region-body-style">
12025
+ <xsl:attribute name="column-count">2</xsl:attribute>
12026
+ <xsl:attribute name="column-gap">10mm</xsl:attribute>
12027
+ </xsl:attribute-set>
12028
+
12029
+ <xsl:attribute-set name="indexsect-title-block-style">
12030
+ <xsl:attribute name="role">SKIP</xsl:attribute>
12031
+ <xsl:attribute name="span">all</xsl:attribute>
12032
+ </xsl:attribute-set>
12033
+
12078
12034
  <xsl:attribute-set name="indexsect-title-style">
12079
12035
  <xsl:attribute name="role">H1</xsl:attribute>
12036
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
12037
+ <xsl:attribute name="margin-bottom">24pt</xsl:attribute>
12038
+ <xsl:attribute name="font-size">22pt</xsl:attribute>
12080
12039
  </xsl:attribute-set> <!-- indexsect-title-style -->
12081
12040
 
12082
12041
  <xsl:template name="refine_indexsect-title-style">
@@ -12102,6 +12061,44 @@
12102
12061
  </xsl:for-each>
12103
12062
  </xsl:variable>
12104
12063
 
12064
+ <xsl:template name="index-pages">
12065
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
12066
+
12067
+ <xsl:variable name="docid">
12068
+ <xsl:call-template name="getDocumentId"/>
12069
+ </xsl:variable>
12070
+
12071
+ <xsl:variable name="current_document_index_id">
12072
+ <xsl:apply-templates select="//mn:indexsect" mode="index_add_id">
12073
+ <xsl:with-param name="docid" select="$docid"/>
12074
+ </xsl:apply-templates>
12075
+ </xsl:variable>
12076
+ <xsl:variable name="current_document_index">
12077
+ <xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
12078
+ </xsl:variable>
12079
+
12080
+ <xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="index">
12081
+ <xsl:with-param name="num" select="$num"/>
12082
+ </xsl:apply-templates>
12083
+ </xsl:template>
12084
+ <xsl:template match="mn:indexsect"/>
12085
+ <xsl:template match="mn:indexsect" mode="index">
12086
+ <xsl:param name="num"/>
12087
+ <fo:page-sequence master-reference="index" force-page-count="no-force">
12088
+ <xsl:call-template name="insertHeaderFooter">
12089
+ <xsl:with-param name="section">main</xsl:with-param>
12090
+ </xsl:call-template>
12091
+ <fo:flow flow-name="xsl-region-body">
12092
+ <fo:block id="{@id}" xsl:use-attribute-sets="indexsect-title-block-style">
12093
+ <xsl:apply-templates select="mn:fmt-title"/>
12094
+ </fo:block>
12095
+ <fo:block role="Index">
12096
+ <xsl:apply-templates select="*[not(self::mn:fmt-title)]"/>
12097
+ </fo:block>
12098
+ </fo:flow>
12099
+ </fo:page-sequence>
12100
+ </xsl:template>
12101
+
12105
12102
  <xsl:template match="@*|node()" mode="index_add_id">
12106
12103
  <xsl:param name="docid"/>
12107
12104
  <xsl:copy>
@@ -12154,7 +12151,7 @@
12154
12151
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
12155
12152
  <xsl:copy>
12156
12153
  <xsl:apply-templates select="@*" mode="index_update"/>
12157
- <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
12154
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
12158
12155
  </xsl:copy>
12159
12156
  </xsl:template>
12160
12157
 
@@ -12362,11 +12359,24 @@
12362
12359
  <!-- End of Index processing -->
12363
12360
  <!-- =================== -->
12364
12361
 
12365
- <!-- =================== -->
12362
+ <xsl:attribute-set name="form-checkbox-style">
12363
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
12364
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
12365
+ </xsl:attribute-set>
12366
+
12367
+ <xsl:variable name="METANORMA_FORM_START_PREFIX">_metanorma_form_start</xsl:variable>
12368
+ <xsl:variable name="METANORMA_FORM_ITEM_PREFIX">_metanorma_form_item_</xsl:variable>
12369
+ <xsl:variable name="METANORMA_FORM_ITEM_BORDER">1pt solid black</xsl:variable>
12370
+
12371
+ <!-- =================== -->
12366
12372
  <!-- Form's elements processing -->
12367
12373
  <!-- =================== -->
12368
12374
  <xsl:template match="mn:form">
12369
12375
  <fo:block>
12376
+ <fo:inline>
12377
+ <xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_START_PREFIX, '___', @id, '___', @name)"/></xsl:attribute>
12378
+ <xsl:value-of select="$hair_space"/>
12379
+ </fo:inline>
12370
12380
  <xsl:apply-templates/>
12371
12381
  </fo:block>
12372
12382
  </xsl:template>
@@ -12375,7 +12385,23 @@
12375
12385
  <fo:inline><xsl:apply-templates/></fo:inline>
12376
12386
  </xsl:template>
12377
12387
 
12378
- <xsl:template match="mn:form//mn:input[@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
12388
+ <xsl:template match="mn:form//mn:input[@type = 'text']">
12389
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
12390
+ <fo:inline>
12391
+ <xsl:call-template name="set_id_metanorma_form_item">
12392
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
12393
+ </xsl:call-template>
12394
+ <xsl:value-of select="$hair_space"/>
12395
+ </fo:inline>
12396
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove, this border needs for mn2pdf FOPIFFormsHandler -->
12397
+ <fo:inline>
12398
+ <xsl:call-template name="set_id_metanorma_form_item"/>
12399
+ <xsl:call-template name="text_input"/>
12400
+ </fo:inline>
12401
+ </fo:inline>
12402
+ </xsl:template>
12403
+
12404
+ <xsl:template match="mn:form//mn:input[@type = 'date' or @type = 'file' or @type = 'password']">
12379
12405
  <fo:inline>
12380
12406
  <xsl:call-template name="text_input"/>
12381
12407
  </fo:inline>
@@ -12407,7 +12433,20 @@
12407
12433
  </xsl:template>
12408
12434
 
12409
12435
  <xsl:template match="mn:form//mn:input[@type = 'checkbox']">
12410
- <fo:inline padding-right="1mm">
12436
+ <xsl:variable name="form_item_type">checkbox</xsl:variable>
12437
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
12438
+ <fo:inline>
12439
+ <xsl:call-template name="set_id_metanorma_form_item">
12440
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
12441
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
12442
+ </xsl:call-template>
12443
+ <xsl:value-of select="$hair_space"/>
12444
+ </fo:inline>
12445
+
12446
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
12447
+ <xsl:call-template name="set_id_metanorma_form_item">
12448
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
12449
+ </xsl:call-template>
12411
12450
  <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
12412
12451
  <xsl:attribute name="height">3.5mm</xsl:attribute>
12413
12452
  <xsl:attribute name="content-width">100%</xsl:attribute>
@@ -12417,11 +12456,24 @@
12417
12456
  <polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
12418
12457
  </svg>
12419
12458
  </fo:instream-foreign-object>
12420
- </fo:inline>
12459
+ </fo:inline><fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
12421
12460
  </xsl:template>
12422
12461
 
12423
12462
  <xsl:template match="mn:form//mn:input[@type = 'radio']">
12424
- <fo:inline padding-right="1mm">
12463
+ <xsl:variable name="form_item_type">radiobutton</xsl:variable>
12464
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
12465
+ <fo:inline>
12466
+ <xsl:call-template name="set_id_metanorma_form_item">
12467
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
12468
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
12469
+ </xsl:call-template>
12470
+ <xsl:value-of select="$hair_space"/>
12471
+ </fo:inline>
12472
+
12473
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
12474
+ <xsl:call-template name="set_id_metanorma_form_item">
12475
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
12476
+ </xsl:call-template>
12425
12477
  <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
12426
12478
  <xsl:attribute name="height">3.5mm</xsl:attribute>
12427
12479
  <xsl:attribute name="content-width">100%</xsl:attribute>
@@ -12433,6 +12485,7 @@
12433
12485
  </svg>
12434
12486
  </fo:instream-foreign-object>
12435
12487
  </fo:inline>
12488
+ <fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
12436
12489
  </xsl:template>
12437
12490
 
12438
12491
  <xsl:template match="mn:form//mn:select">
@@ -12442,11 +12495,28 @@
12442
12495
  </xsl:template>
12443
12496
 
12444
12497
  <xsl:template match="mn:form//mn:textarea">
12445
- <fo:block-container border="1pt solid black" width="50%">
12498
+ <fo:block-container border="{$METANORMA_FORM_ITEM_BORDER}" width="50%">
12446
12499
  <fo:block> </fo:block>
12447
12500
  </fo:block-container>
12448
12501
  </xsl:template>
12449
12502
 
12503
+ <xsl:template name="set_id_metanorma_form_item">
12504
+ <xsl:param name="form_item_type">textfield</xsl:param>
12505
+ <xsl:param name="add_border_prefix">false</xsl:param>
12506
+ <xsl:variable name="border_prefix"><xsl:if test="normalize-space($add_border_prefix) = 'true'">border_</xsl:if></xsl:variable>
12507
+ <xsl:if test="@id">
12508
+ <!-- _metanorma_form_item_border____form_item_type___id___name___value -->
12509
+ <!-- split by '___': [2] - form_item_type, [3] - id, [4] - name, [5] - value -->
12510
+ <xsl:variable name="value">
12511
+ <xsl:choose>
12512
+ <xsl:when test="@type = 'checkbox'"><xsl:value-of select="normalize-space(@checked = 'true')"/><!-- true or false --></xsl:when>
12513
+ <xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
12514
+ </xsl:choose>
12515
+ </xsl:variable>
12516
+ <xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_ITEM_PREFIX, $border_prefix, '___', $form_item_type, '___', @id, '___', @name, '___', $value)"/></xsl:attribute>
12517
+ </xsl:if>
12518
+ </xsl:template>
12519
+
12450
12520
  <!-- =================== -->
12451
12521
  <!-- End Form's elements processing -->
12452
12522
  <!-- =================== -->
@@ -12515,6 +12585,7 @@
12515
12585
  </xsl:template>
12516
12586
 
12517
12587
  <xsl:attribute-set name="toc-pagenumber-style">
12588
+ <xsl:attribute name="role">SKIP</xsl:attribute>
12518
12589
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
12519
12590
  </xsl:attribute-set>
12520
12591
 
@@ -12524,6 +12595,7 @@
12524
12595
  <!-- List of Figures, Tables -->
12525
12596
  <xsl:attribute-set name="toc-listof-title-style">
12526
12597
  <!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
12598
+ <xsl:attribute name="role">TOCI</xsl:attribute>
12527
12599
  <xsl:attribute name="font-weight">bold</xsl:attribute>
12528
12600
  <xsl:attribute name="color">black</xsl:attribute>
12529
12601
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -14363,7 +14435,12 @@
14363
14435
  <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
14364
14436
  <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
14365
14437
  <xsl:choose>
14366
- <xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
14438
+ <xsl:when test="$internal-destination = 'true'">
14439
+ <fo:wrapper role="Reference">
14440
+ <xsl:copy-of select="$element_node"/>
14441
+ </fo:wrapper>
14442
+ </xsl:when>
14443
+ <xsl:when test="$external-destination = 'true'">
14367
14444
  <xsl:copy-of select="$element_node"/>
14368
14445
  </xsl:when>
14369
14446
  <xsl:otherwise>
@@ -208,11 +208,15 @@ Applicable to modify and delete</a:documentation>
208
208
  </zeroOrMore>
209
209
  <optional>
210
210
  <element name="newcontent">
211
- <a:documentation>New content to be added to the document; applicable to add and modify</a:documentation>
211
+ <a:documentation>New content to be added to the document; applicable to add and modify.
212
+ Can be blocks and/or sections</a:documentation>
212
213
  <ref name="OptionalId"/>
213
214
  <zeroOrMore>
214
215
  <ref name="BasicBlock"/>
215
216
  </zeroOrMore>
217
+ <zeroOrMore>
218
+ <ref name="section"/>
219
+ </zeroOrMore>
216
220
  </element>
217
221
  </optional>
218
222
  <zeroOrMore>
@@ -0,0 +1,9 @@
1
+ require "metanorma-generic"
2
+
3
+ module Metanorma
4
+ module Ribose
5
+ class Cleanup < Metanorma::Generic::Cleanup
6
+ extend Forwardable
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
- require "metanorma/standoc/converter"
2
- require "metanorma/generic/converter"
1
+ require "metanorma-standoc"
2
+ require "metanorma-generic"
3
3
 
4
4
  module Metanorma
5
5
  module Ribose
@@ -0,0 +1,6 @@
1
+ module Metanorma
2
+ module Ribose
3
+ class Validate < Metanorma::Generic::Validate
4
+ end
5
+ end
6
+ end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.8.0".freeze
3
+ VERSION = "2.8.1".freeze
4
4
  end
5
5
  end
@@ -1,5 +1,7 @@
1
1
  require "asciidoctor" unless defined? Asciidoctor::Converter
2
2
  require_relative "metanorma/ribose/converter"
3
+ require_relative "metanorma/ribose/cleanup"
4
+ require_relative "metanorma/ribose/validate"
3
5
  require_relative "isodoc/ribose/base_convert"
4
6
  require_relative "isodoc/ribose/html_convert"
5
7
  require_relative "isodoc/ribose/word_convert"
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
31
31
 
32
- spec.add_dependency "metanorma-generic", "~> 3.2.0"
32
+ spec.add_dependency "metanorma-generic", "~> 3.3.0"
33
33
 
34
34
  spec.add_development_dependency "debug"
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-02-16 00:00:00.000000000 Z
11
+ date: 2026-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.0
19
+ version: 3.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.0
26
+ version: 3.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -240,6 +240,7 @@ files:
240
240
  - lib/metanorma/ribose/biblio-standoc.rng
241
241
  - lib/metanorma/ribose/biblio.rng
242
242
  - lib/metanorma/ribose/boilerplate.adoc
243
+ - lib/metanorma/ribose/cleanup.rb
243
244
  - lib/metanorma/ribose/converter.rb
244
245
  - lib/metanorma/ribose/isodoc.rng
245
246
  - lib/metanorma/ribose/log.rb
@@ -247,6 +248,7 @@ files:
247
248
  - lib/metanorma/ribose/relaton-ribose.rng
248
249
  - lib/metanorma/ribose/reqt.rng
249
250
  - lib/metanorma/ribose/ribose.rng
251
+ - lib/metanorma/ribose/validate.rb
250
252
  - lib/metanorma/ribose/version.rb
251
253
  - metanorma-ribose.gemspec
252
254
  - metanorma.yml