metanorma-jis 0.6.4 → 0.6.6
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/isodoc/jis/html/style-human.css +40 -46
- data/lib/isodoc/jis/html/style-human.scss +1 -1
- data/lib/isodoc/jis/html/style-iso.css +40 -46
- data/lib/isodoc/jis/init.rb +1 -1
- data/lib/isodoc/jis/jis.international-standard.xsl +77 -58
- data/lib/isodoc/jis/presentation_xml_convert.rb +39 -11
- data/lib/metanorma/jis/cleanup.rb +3 -2
- data/lib/metanorma/jis/front.rb +6 -6
- data/lib/metanorma/jis/isodoc.rng +26 -19
- data/lib/metanorma/jis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ab0b01630fb8d1bfe5b00f02e1a2b5bdec5d25747bdb0cff159637bf113aca4
|
4
|
+
data.tar.gz: f6c399abfa6e0eb718c699442c94c0bf697ed62860320b4c4cd998192e1676af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca03cf008a8456cb07057dd40ff491a2354f8b46c4f85b9b2debf1a3305301d10419155296821ae154707c52e4ca66e858d0e07d5380f4cd64366b1466773646
|
7
|
+
data.tar.gz: 06c7813d7204d9257c8eb3da0666b2196b1a22d979d839411961b5a5cc7a441d781b5173e55b632834bf9981b151c8c77ae8db9f1f0372bc95650ef2f4bd32c4
|
@@ -145,16 +145,6 @@ div.document-stage-band, div.document-type-band {
|
|
145
145
|
background-color: #333333;
|
146
146
|
}
|
147
147
|
|
148
|
-
a.FootnoteRef + a.FootnoteRef::before {
|
149
|
-
content: ", ";
|
150
|
-
vertical-align: super;
|
151
|
-
}
|
152
|
-
|
153
|
-
a.TableFootnoteRef + a.TableFootnoteRef::before {
|
154
|
-
content: ", ";
|
155
|
-
vertical-align: super;
|
156
|
-
}
|
157
|
-
|
158
148
|
a.TableFootnoteRef, span.TableFootnoteRef,
|
159
149
|
a.FootnoteRef, span.FootnoteRef {
|
160
150
|
vertical-align: super;
|
@@ -717,10 +707,6 @@ p.Terms {
|
|
717
707
|
}
|
718
708
|
|
719
709
|
/* Navigation*/
|
720
|
-
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
721
|
-
font-family: {{bodyfont}};
|
722
|
-
font-weight: 400;
|
723
|
-
}
|
724
710
|
#toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
|
725
711
|
margin: 0;
|
726
712
|
padding: 0;
|
@@ -768,6 +754,10 @@ p.Terms {
|
|
768
754
|
color: black;
|
769
755
|
}
|
770
756
|
}
|
757
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
758
|
+
font-family: {{bodyfont}};
|
759
|
+
font-weight: 400;
|
760
|
+
}
|
771
761
|
@media screen and (max-width: 768px) {
|
772
762
|
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
773
763
|
padding: 0 1.5em;
|
@@ -785,9 +775,6 @@ p.Terms {
|
|
785
775
|
font-size: 100%;
|
786
776
|
}
|
787
777
|
|
788
|
-
nav {
|
789
|
-
line-height: 1.2em;
|
790
|
-
}
|
791
778
|
@media screen and (min-width: 768px) {
|
792
779
|
nav {
|
793
780
|
position: fixed;
|
@@ -812,11 +799,10 @@ nav {
|
|
812
799
|
background-color: white;
|
813
800
|
}
|
814
801
|
}
|
815
|
-
|
816
|
-
|
817
|
-
margin-left: -4em;
|
818
|
-
margin-top: -2em;
|
802
|
+
nav {
|
803
|
+
line-height: 1.2em;
|
819
804
|
}
|
805
|
+
|
820
806
|
@media screen and (min-width: 768px) {
|
821
807
|
#toggle {
|
822
808
|
position: fixed;
|
@@ -845,6 +831,10 @@ nav {
|
|
845
831
|
display: none;
|
846
832
|
}
|
847
833
|
}
|
834
|
+
#toggle {
|
835
|
+
margin-left: -4em;
|
836
|
+
margin-top: -2em;
|
837
|
+
}
|
848
838
|
|
849
839
|
@media screen and (min-width: 768px) {
|
850
840
|
.container {
|
@@ -875,17 +865,6 @@ nav {
|
|
875
865
|
width: 100%;
|
876
866
|
}
|
877
867
|
}
|
878
|
-
.figure,
|
879
|
-
pre,
|
880
|
-
.pseudocode {
|
881
|
-
background-color: #f7f7f7;
|
882
|
-
font-size: {{monospacefontsize}};
|
883
|
-
line-height: 1.6em;
|
884
|
-
padding: 1.5em;
|
885
|
-
margin: 2em 0 1em 0;
|
886
|
-
overflow: auto;
|
887
|
-
font-size: {{normalfontsize}};
|
888
|
-
}
|
889
868
|
.figure .SourceTitle,
|
890
869
|
pre .SourceTitle,
|
891
870
|
.pseudocode .SourceTitle {
|
@@ -893,13 +872,18 @@ pre .SourceTitle,
|
|
893
872
|
font-size: 1em;
|
894
873
|
text-align: center;
|
895
874
|
}
|
896
|
-
|
897
|
-
|
875
|
+
.figure,
|
876
|
+
pre,
|
877
|
+
.pseudocode {
|
878
|
+
background-color: #f7f7f7;
|
879
|
+
font-size: {{monospacefontsize}};
|
898
880
|
line-height: 1.6em;
|
899
881
|
padding: 1.5em;
|
900
882
|
margin: 2em 0 1em 0;
|
901
883
|
overflow: auto;
|
884
|
+
font-size: {{normalfontsize}};
|
902
885
|
}
|
886
|
+
|
903
887
|
div.figure .FigureTitle, div.figure .figure-title {
|
904
888
|
font-weight: 700;
|
905
889
|
font-size: 1em;
|
@@ -912,6 +896,12 @@ div.figure > img, div.figure > svg {
|
|
912
896
|
max-width: 100%;
|
913
897
|
height: auto;
|
914
898
|
}
|
899
|
+
div.figure {
|
900
|
+
line-height: 1.6em;
|
901
|
+
padding: 1.5em;
|
902
|
+
margin: 2em 0 1em 0;
|
903
|
+
overflow: auto;
|
904
|
+
}
|
915
905
|
|
916
906
|
table div.figure {
|
917
907
|
padding: 0;
|
@@ -1143,6 +1133,13 @@ p.NormRef {
|
|
1143
1133
|
/*
|
1144
1134
|
3.6 Source Code + figures
|
1145
1135
|
*/
|
1136
|
+
.figure .SourceTitle,
|
1137
|
+
pre .SourceTitle,
|
1138
|
+
.pseudocode .SourceTitle {
|
1139
|
+
font-weight: 700;
|
1140
|
+
font-size: 1em;
|
1141
|
+
text-align: center;
|
1142
|
+
}
|
1146
1143
|
.figure,
|
1147
1144
|
pre,
|
1148
1145
|
.pseudocode {
|
@@ -1154,13 +1151,6 @@ pre,
|
|
1154
1151
|
overflow: auto;
|
1155
1152
|
font-size: {{normalfontsize}};
|
1156
1153
|
}
|
1157
|
-
.figure .SourceTitle,
|
1158
|
-
pre .SourceTitle,
|
1159
|
-
.pseudocode .SourceTitle {
|
1160
|
-
font-weight: 700;
|
1161
|
-
font-size: 1em;
|
1162
|
-
text-align: center;
|
1163
|
-
}
|
1164
1154
|
|
1165
1155
|
pre {
|
1166
1156
|
font-family: {{monospacefont}};
|
@@ -1233,19 +1223,23 @@ pre {
|
|
1233
1223
|
padding: 0.5em;
|
1234
1224
|
margin: 2em 0 1em 0;
|
1235
1225
|
text-align: left;
|
1236
|
-
color: #424242;
|
1237
|
-
padding-left: 2em;
|
1238
|
-
color: black;
|
1239
|
-
padding-left: 2em;
|
1240
1226
|
}
|
1241
1227
|
.example p {
|
1242
1228
|
margin: 0;
|
1243
1229
|
}
|
1230
|
+
.example {
|
1231
|
+
color: #424242;
|
1232
|
+
padding-left: 2em;
|
1233
|
+
}
|
1244
1234
|
.example .example-title {
|
1245
1235
|
font-weight: 700;
|
1246
1236
|
text-transform: uppercase;
|
1247
1237
|
margin-left: -1.5em;
|
1248
1238
|
}
|
1239
|
+
.example {
|
1240
|
+
color: black;
|
1241
|
+
padding-left: 2em;
|
1242
|
+
}
|
1249
1243
|
.example .example-title {
|
1250
1244
|
margin-left: -1.5em;
|
1251
1245
|
}
|
@@ -1345,7 +1339,7 @@ span.TableFootnoteRef {
|
|
1345
1339
|
font-size: {{footnotefontsize}};
|
1346
1340
|
}
|
1347
1341
|
|
1348
|
-
sup
|
1342
|
+
sup {
|
1349
1343
|
vertical-align: super;
|
1350
1344
|
font-size: 0.8em;
|
1351
1345
|
}
|
@@ -145,16 +145,6 @@ div.document-stage-band, div.document-type-band {
|
|
145
145
|
background-color: #333333;
|
146
146
|
}
|
147
147
|
|
148
|
-
a.FootnoteRef + a.FootnoteRef::before {
|
149
|
-
content: ", ";
|
150
|
-
vertical-align: super;
|
151
|
-
}
|
152
|
-
|
153
|
-
a.TableFootnoteRef + a.TableFootnoteRef::before {
|
154
|
-
content: ", ";
|
155
|
-
vertical-align: super;
|
156
|
-
}
|
157
|
-
|
158
148
|
a.TableFootnoteRef, span.TableFootnoteRef,
|
159
149
|
a.FootnoteRef, span.FootnoteRef {
|
160
150
|
vertical-align: super;
|
@@ -660,10 +650,6 @@ p.Terms {
|
|
660
650
|
}
|
661
651
|
|
662
652
|
/* Navigation*/
|
663
|
-
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
664
|
-
font-family: {{bodyfont}};
|
665
|
-
font-weight: 400;
|
666
|
-
}
|
667
653
|
#toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
|
668
654
|
margin: 0;
|
669
655
|
padding: 0;
|
@@ -711,6 +697,10 @@ p.Terms {
|
|
711
697
|
color: black;
|
712
698
|
}
|
713
699
|
}
|
700
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
701
|
+
font-family: {{bodyfont}};
|
702
|
+
font-weight: 400;
|
703
|
+
}
|
714
704
|
@media screen and (max-width: 768px) {
|
715
705
|
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
716
706
|
padding: 0 1.5em;
|
@@ -734,9 +724,6 @@ p.Terms {
|
|
734
724
|
font-size: 100%;
|
735
725
|
}
|
736
726
|
|
737
|
-
nav {
|
738
|
-
line-height: 1.2em;
|
739
|
-
}
|
740
727
|
@media screen and (min-width: 768px) {
|
741
728
|
nav {
|
742
729
|
position: fixed;
|
@@ -761,12 +748,10 @@ nav {
|
|
761
748
|
background-color: white;
|
762
749
|
}
|
763
750
|
}
|
764
|
-
|
765
|
-
|
766
|
-
border-right: solid black 1px;
|
767
|
-
margin-left: -4em;
|
768
|
-
margin-top: -2em;
|
751
|
+
nav {
|
752
|
+
line-height: 1.2em;
|
769
753
|
}
|
754
|
+
|
770
755
|
@media screen and (min-width: 768px) {
|
771
756
|
#toggle {
|
772
757
|
position: fixed;
|
@@ -795,6 +780,11 @@ nav {
|
|
795
780
|
display: none;
|
796
781
|
}
|
797
782
|
}
|
783
|
+
#toggle {
|
784
|
+
border-right: solid black 1px;
|
785
|
+
margin-left: -4em;
|
786
|
+
margin-top: -2em;
|
787
|
+
}
|
798
788
|
|
799
789
|
@media screen and (min-width: 768px) {
|
800
790
|
.container {
|
@@ -824,17 +814,6 @@ nav {
|
|
824
814
|
width: 100%;
|
825
815
|
}
|
826
816
|
}
|
827
|
-
.figure,
|
828
|
-
pre,
|
829
|
-
.pseudocode {
|
830
|
-
background-color: #f7f7f7;
|
831
|
-
font-size: {{monospacefontsize}};
|
832
|
-
line-height: 1.6em;
|
833
|
-
padding: 1.5em;
|
834
|
-
margin: 2em 0 1em 0;
|
835
|
-
overflow: auto;
|
836
|
-
font-size: {{normalfontsize}};
|
837
|
-
}
|
838
817
|
.figure .SourceTitle,
|
839
818
|
pre .SourceTitle,
|
840
819
|
.pseudocode .SourceTitle {
|
@@ -842,13 +821,18 @@ pre .SourceTitle,
|
|
842
821
|
font-size: 1em;
|
843
822
|
text-align: center;
|
844
823
|
}
|
845
|
-
|
846
|
-
|
824
|
+
.figure,
|
825
|
+
pre,
|
826
|
+
.pseudocode {
|
827
|
+
background-color: #f7f7f7;
|
828
|
+
font-size: {{monospacefontsize}};
|
847
829
|
line-height: 1.6em;
|
848
830
|
padding: 1.5em;
|
849
831
|
margin: 2em 0 1em 0;
|
850
832
|
overflow: auto;
|
833
|
+
font-size: {{normalfontsize}};
|
851
834
|
}
|
835
|
+
|
852
836
|
div.figure .FigureTitle, div.figure .figure-title {
|
853
837
|
font-weight: 700;
|
854
838
|
font-size: 1em;
|
@@ -861,6 +845,12 @@ div.figure > img, div.figure > svg {
|
|
861
845
|
max-width: 100%;
|
862
846
|
height: auto;
|
863
847
|
}
|
848
|
+
div.figure {
|
849
|
+
line-height: 1.6em;
|
850
|
+
padding: 1.5em;
|
851
|
+
margin: 2em 0 1em 0;
|
852
|
+
overflow: auto;
|
853
|
+
}
|
864
854
|
|
865
855
|
table div.figure {
|
866
856
|
padding: 0;
|
@@ -1208,6 +1198,13 @@ p.Biblio, p.NormRef {
|
|
1208
1198
|
/*
|
1209
1199
|
3.6 Source Code + figures
|
1210
1200
|
*/
|
1201
|
+
.figure .SourceTitle,
|
1202
|
+
pre .SourceTitle,
|
1203
|
+
.pseudocode .SourceTitle {
|
1204
|
+
font-weight: 700;
|
1205
|
+
font-size: 1em;
|
1206
|
+
text-align: center;
|
1207
|
+
}
|
1211
1208
|
.figure,
|
1212
1209
|
pre,
|
1213
1210
|
.pseudocode {
|
@@ -1219,13 +1216,6 @@ pre,
|
|
1219
1216
|
overflow: auto;
|
1220
1217
|
font-size: {{normalfontsize}};
|
1221
1218
|
}
|
1222
|
-
.figure .SourceTitle,
|
1223
|
-
pre .SourceTitle,
|
1224
|
-
.pseudocode .SourceTitle {
|
1225
|
-
font-weight: 700;
|
1226
|
-
font-size: 1em;
|
1227
|
-
text-align: center;
|
1228
|
-
}
|
1229
1219
|
|
1230
1220
|
pre {
|
1231
1221
|
font-family: {{monospacefont}};
|
@@ -1299,19 +1289,23 @@ div.zzHelp {
|
|
1299
1289
|
padding: 0.5em;
|
1300
1290
|
margin: 2em 0 1em 0;
|
1301
1291
|
text-align: left;
|
1302
|
-
color: #424242;
|
1303
|
-
padding-left: 2em;
|
1304
|
-
color: black;
|
1305
|
-
padding-left: 0.5em;
|
1306
1292
|
}
|
1307
1293
|
.example p {
|
1308
1294
|
margin: 0;
|
1309
1295
|
}
|
1296
|
+
.example {
|
1297
|
+
color: #424242;
|
1298
|
+
padding-left: 2em;
|
1299
|
+
}
|
1310
1300
|
.example .example-title {
|
1311
1301
|
font-weight: 700;
|
1312
1302
|
text-transform: uppercase;
|
1313
1303
|
margin-left: -1.5em;
|
1314
1304
|
}
|
1305
|
+
.example {
|
1306
|
+
color: black;
|
1307
|
+
padding-left: 0.5em;
|
1308
|
+
}
|
1315
1309
|
.example .example-title {
|
1316
1310
|
margin-top: 0;
|
1317
1311
|
}
|
data/lib/isodoc/jis/init.rb
CHANGED
@@ -534,6 +534,8 @@
|
|
534
534
|
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
535
535
|
</xsl:call-template>
|
536
536
|
|
537
|
+
<xsl:call-template name="inner-cover-page"/>
|
538
|
+
|
537
539
|
<!-- ========================== -->
|
538
540
|
<!-- Contents and preface pages -->
|
539
541
|
<!-- ========================== -->
|
@@ -1024,6 +1026,9 @@
|
|
1024
1026
|
</xsl:if>
|
1025
1027
|
</xsl:template>
|
1026
1028
|
|
1029
|
+
<xsl:template name="inner-cover-page">
|
1030
|
+
</xsl:template>
|
1031
|
+
|
1027
1032
|
<xsl:template match="mn:references[not(@hidden = 'true')]" mode="linear_xml" priority="2">
|
1028
1033
|
<xsl:copy>
|
1029
1034
|
<xsl:apply-templates select="@*|node()" mode="linear_xml"/>
|
@@ -2869,7 +2874,7 @@
|
|
2869
2874
|
<!-- mn:term/mn:preferred2//text() | -->
|
2870
2875
|
|
2871
2876
|
<!-- <name>注記 1</name> to <name>注記<font_en> 1</font_en></name> -->
|
2872
|
-
<xsl:template match="mn:title/text() | mn:fmt-title/text() | mn:term/mn:name/text() | mn:term/mn:fmt-name/text() | mn:note/mn:name/text() | mn:note/mn:fmt-name/text() | mn:termnote/mn:name/text() |mn:termnote/mn:fmt-name/text() | mn:table/mn:name/text() |mn:table/mn:fmt-name/text() | mn:figure/mn:name/text() |mn:figure/mn:fmt-name/text() | mn:termexample/mn:name/text() |mn:termexample/mn:fmtname/text() | mn:xref//text() | mn:fmt-xref//text() | mn:origin/text() | mn:fmt-origin/text()" mode="update_xml_step1">
|
2877
|
+
<xsl:template match="mn:title/text() | mn:fmt-title/text() | mn:term/mn:name/text() | mn:term/mn:fmt-name/text() | mn:note/mn:name/text() | mn:note/mn:fmt-name/text() | mn:termnote/mn:name/text() |mn:termnote/mn:fmt-name/text() | mn:table/mn:name/text() |mn:table/mn:fmt-name/text() | mn:figure/mn:name/text() |mn:figure/mn:fmt-name/text() | mn:termexample/mn:name/text() |mn:termexample/mn:fmtname/text() | mn:xref//text() | mn:fmt-xref//text() | mn:origin/text() | mn:fmt-origin/text() | mn:fmt-link/text()" mode="update_xml_step1">
|
2873
2878
|
<xsl:choose>
|
2874
2879
|
<xsl:when test="$vertical_layout = 'true'">
|
2875
2880
|
<xsl:choose>
|
@@ -5797,6 +5802,7 @@
|
|
5797
5802
|
<xsl:variable name="en_dash">–</xsl:variable>
|
5798
5803
|
<xsl:variable name="em_dash">—</xsl:variable>
|
5799
5804
|
<xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
|
5805
|
+
<xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
|
5800
5806
|
<xsl:variable name="cr"> </xsl:variable>
|
5801
5807
|
<xsl:variable name="lf">
|
5802
5808
|
</xsl:variable>
|
@@ -6360,6 +6366,7 @@
|
|
6360
6366
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
|
6361
6367
|
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
|
6362
6368
|
<xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
6369
|
+
<xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
6363
6370
|
<!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
6364
6371
|
<xsl:template match="mn:preferred" mode="update_xml_step1"/>
|
6365
6372
|
<!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
@@ -6374,10 +6381,10 @@
|
|
6374
6381
|
|
6375
6382
|
<xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
6376
6383
|
|
6377
|
-
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
|
6384
|
+
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
|
6378
6385
|
<xsl:copy>
|
6379
6386
|
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
6380
|
-
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
|
6387
|
+
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
|
6381
6388
|
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
6382
6389
|
</xsl:copy>
|
6383
6390
|
</xsl:template>
|
@@ -7322,7 +7329,6 @@
|
|
7322
7329
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
7323
7330
|
|
7324
7331
|
<xsl:template name="refine_feedback-statement-title-style">
|
7325
|
-
|
7326
7332
|
</xsl:template>
|
7327
7333
|
|
7328
7334
|
<xsl:attribute-set name="feedback-statement-p-style">
|
@@ -7572,6 +7578,12 @@
|
|
7572
7578
|
<xsl:template name="refine_sourcecode-style">
|
7573
7579
|
</xsl:template> <!-- refine_sourcecode-style -->
|
7574
7580
|
|
7581
|
+
<xsl:attribute-set name="sourcecode-number-style">
|
7582
|
+
</xsl:attribute-set>
|
7583
|
+
|
7584
|
+
<xsl:template name="refine_sourcecode-number-style">
|
7585
|
+
</xsl:template>
|
7586
|
+
|
7575
7587
|
<xsl:attribute-set name="sourcecode-name-style">
|
7576
7588
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
7577
7589
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -8972,6 +8984,12 @@
|
|
8972
8984
|
</xsl:if>
|
8973
8985
|
</xsl:template>
|
8974
8986
|
|
8987
|
+
<xsl:attribute-set name="preferred-style">
|
8988
|
+
</xsl:attribute-set> <!-- preferred-style -->
|
8989
|
+
|
8990
|
+
<xsl:template name="refine_preferred-style">
|
8991
|
+
</xsl:template>
|
8992
|
+
|
8975
8993
|
<xsl:attribute-set name="preferred-block-style">
|
8976
8994
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
8977
8995
|
|
@@ -9579,6 +9597,12 @@
|
|
9579
9597
|
</xsl:if>
|
9580
9598
|
</xsl:template> <!-- refine_table-style -->
|
9581
9599
|
|
9600
|
+
<xsl:attribute-set name="table-number-style">
|
9601
|
+
</xsl:attribute-set>
|
9602
|
+
|
9603
|
+
<xsl:template name="refine_table-number-style">
|
9604
|
+
</xsl:template>
|
9605
|
+
|
9582
9606
|
<xsl:attribute-set name="table-name-style">
|
9583
9607
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
9584
9608
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
@@ -10054,7 +10078,7 @@
|
|
10054
10078
|
|
10055
10079
|
</fo:block>
|
10056
10080
|
|
10057
|
-
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
10081
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
10058
10082
|
<xsl:if test="$continued = 'true'">
|
10059
10083
|
|
10060
10084
|
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
@@ -13128,15 +13152,22 @@
|
|
13128
13152
|
<xsl:if test="ancestor::mn:li">
|
13129
13153
|
<xsl:attribute name="margin-left">7.5mm</xsl:attribute>
|
13130
13154
|
</xsl:if>
|
13131
|
-
</xsl:template>
|
13155
|
+
</xsl:template> <!-- refine_quote-style -->
|
13132
13156
|
|
13133
13157
|
<xsl:attribute-set name="quote-source-style">
|
13134
13158
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
13135
|
-
</xsl:attribute-set>
|
13159
|
+
</xsl:attribute-set> <!-- quote-source-style -->
|
13136
13160
|
|
13137
13161
|
<xsl:template name="refine_quote-source-style">
|
13138
13162
|
</xsl:template>
|
13139
13163
|
|
13164
|
+
<xsl:attribute-set name="source-style">
|
13165
|
+
</xsl:attribute-set> <!-- source-style -->
|
13166
|
+
|
13167
|
+
<xsl:template name="refine_source-style">
|
13168
|
+
|
13169
|
+
</xsl:template> <!-- refine_source-style -->
|
13170
|
+
|
13140
13171
|
<!-- ====== -->
|
13141
13172
|
<!-- quote -->
|
13142
13173
|
<!-- source -->
|
@@ -13188,7 +13219,9 @@
|
|
13188
13219
|
</xsl:if>
|
13189
13220
|
<xsl:choose>
|
13190
13221
|
<xsl:when test="not(parent::quote)">
|
13191
|
-
<fo:block>
|
13222
|
+
<fo:block xsl:use-attribute-sets="source-style">
|
13223
|
+
<xsl:call-template name="refine_source-style"/>
|
13224
|
+
|
13192
13225
|
<xsl:call-template name="insert_basic_link">
|
13193
13226
|
<xsl:with-param name="element">
|
13194
13227
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -13298,6 +13331,12 @@
|
|
13298
13331
|
<xsl:template name="refine_figure-style">
|
13299
13332
|
</xsl:template>
|
13300
13333
|
|
13334
|
+
<xsl:attribute-set name="figure-number-style">
|
13335
|
+
</xsl:attribute-set>
|
13336
|
+
|
13337
|
+
<xsl:template name="refine_figure-number-style">
|
13338
|
+
</xsl:template>
|
13339
|
+
|
13301
13340
|
<xsl:attribute-set name="figure-name-style">
|
13302
13341
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
13303
13342
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -15401,7 +15440,7 @@
|
|
15401
15440
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
15402
15441
|
</xsl:if>
|
15403
15442
|
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
15404
|
-
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]"
|
15443
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if><!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas'"></xsl:if> -->
|
15405
15444
|
</xsl:template> <!-- refine_fn-reference-style -->
|
15406
15445
|
|
15407
15446
|
<xsl:attribute-set name="fn-style">
|
@@ -15412,7 +15451,9 @@
|
|
15412
15451
|
</xsl:template>
|
15413
15452
|
|
15414
15453
|
<xsl:attribute-set name="fn-num-style">
|
15454
|
+
<xsl:attribute name="role">Reference</xsl:attribute>
|
15415
15455
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
15456
|
+
<xsl:attribute name="font-size">65%</xsl:attribute>
|
15416
15457
|
<xsl:attribute name="font-size">67%</xsl:attribute>
|
15417
15458
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
15418
15459
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -15511,33 +15552,16 @@
|
|
15511
15552
|
<xsl:variable name="ref_id" select="@target"/>
|
15512
15553
|
|
15513
15554
|
<xsl:variable name="footnote_inline">
|
15514
|
-
<fo:inline
|
15515
|
-
|
15516
|
-
<xsl:variable name="fn_styles">
|
15517
|
-
<xsl:choose>
|
15518
|
-
<xsl:when test="ancestor::mn:bibitem">
|
15519
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
15520
|
-
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
15521
|
-
</fn_styles>
|
15522
|
-
</xsl:when>
|
15523
|
-
<xsl:otherwise>
|
15524
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
15525
|
-
<xsl:call-template name="refine_fn-num-style"/>
|
15526
|
-
</fn_styles>
|
15527
|
-
</xsl:otherwise>
|
15528
|
-
</xsl:choose>
|
15529
|
-
</xsl:variable>
|
15555
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
15530
15556
|
|
15531
|
-
<xsl:
|
15532
|
-
<xsl:copy-of select="."/>
|
15533
|
-
</xsl:for-each>
|
15557
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
15534
15558
|
|
15535
15559
|
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
15536
15560
|
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
15537
15561
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
15538
15562
|
</xsl:if> -->
|
15539
15563
|
|
15540
|
-
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]"
|
15564
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if>
|
15541
15565
|
|
15542
15566
|
<xsl:call-template name="insert_basic_link">
|
15543
15567
|
<xsl:with-param name="element">
|
@@ -15876,33 +15900,6 @@
|
|
15876
15900
|
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
15877
15901
|
</xsl:template>
|
15878
15902
|
|
15879
|
-
<!-- footnote reference number for bibitem, in the text -->
|
15880
|
-
<xsl:attribute-set name="bibitem-note-fn-style">
|
15881
|
-
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
15882
|
-
<xsl:attribute name="font-size">65%</xsl:attribute>
|
15883
|
-
<xsl:attribute name="font-size">67%</xsl:attribute>
|
15884
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
15885
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
15886
|
-
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
15887
|
-
|
15888
|
-
<xsl:template name="refine_bibitem-note-fn-style">
|
15889
|
-
<xsl:if test="not($vertical_layout = 'true')">
|
15890
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
15891
|
-
</xsl:if>
|
15892
|
-
</xsl:template>
|
15893
|
-
|
15894
|
-
<!-- footnote number on the page bottom -->
|
15895
|
-
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
15896
|
-
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
15897
|
-
</xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
|
15898
|
-
|
15899
|
-
<!-- footnote body (text) on the page bottom -->
|
15900
|
-
<xsl:attribute-set name="bibitem-note-fn-body-style">
|
15901
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
15902
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
15903
|
-
<xsl:attribute name="start-indent">0pt</xsl:attribute>
|
15904
|
-
</xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
|
15905
|
-
|
15906
15903
|
<xsl:attribute-set name="references-non-normative-style">
|
15907
15904
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
15908
15905
|
|
@@ -15999,7 +15996,7 @@
|
|
15999
15996
|
|
16000
15997
|
<fo:list-item>
|
16001
15998
|
<fo:list-item-label end-indent="label-end()">
|
16002
|
-
<fo:block role="SKIP">
|
15999
|
+
<fo:block role="SKIP" id="__internal_layout__bibitem_{@id}_{generate-id()}">
|
16003
16000
|
<fo:inline role="SKIP">
|
16004
16001
|
<xsl:apply-templates select="mn:biblio-tag">
|
16005
16002
|
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
@@ -18285,10 +18282,28 @@
|
|
18285
18282
|
</xsl:choose>
|
18286
18283
|
</xsl:template>
|
18287
18284
|
|
18285
|
+
<xsl:attribute-set name="clause-style">
|
18286
|
+
|
18287
|
+
</xsl:attribute-set>
|
18288
|
+
|
18289
|
+
<xsl:template name="refine_clause-style">
|
18290
|
+
<!-- commented for https://github.com/metanorma/metanorma-ribose/issues/421 -->
|
18291
|
+
<!-- <xsl:if test="$namespace = 'rsd'">
|
18292
|
+
<xsl:variable name="level">
|
18293
|
+
<xsl:call-template name="getLevel">
|
18294
|
+
<xsl:with-param name="depth" select="mn:fmt-title/@depth"/>
|
18295
|
+
</xsl:call-template>
|
18296
|
+
</xsl:variable>
|
18297
|
+
<xsl:if test="$level >= 4">
|
18298
|
+
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
18299
|
+
</xsl:if>
|
18300
|
+
</xsl:if> -->
|
18301
|
+
</xsl:template>
|
18302
|
+
|
18288
18303
|
<!-- main sections -->
|
18289
18304
|
<xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
|
18290
18305
|
<xsl:call-template name="setNamedDestination"/>
|
18291
|
-
<fo:block>
|
18306
|
+
<fo:block role="Sect">
|
18292
18307
|
<xsl:call-template name="setId"/>
|
18293
18308
|
|
18294
18309
|
<xsl:call-template name="sections_element_style"/>
|
@@ -18412,6 +18427,10 @@
|
|
18412
18427
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
18413
18428
|
</xsl:template>
|
18414
18429
|
|
18430
|
+
<!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
|
18431
|
+
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
|
18432
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
18433
|
+
|
18415
18434
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
18416
18435
|
<xsl:template name="insert_basic_link">
|
18417
18436
|
<xsl:param name="element"/>
|
@@ -48,11 +48,13 @@ module IsoDoc
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def source1_label(elem, sources, ancestor)
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
elem.children = if ancestor == :table
|
52
|
+
l10n("#{@i18n.source}: #{sources}")
|
53
|
+
elsif /\(.+\)/.match?(sources)
|
54
|
+
l10n("[#{@i18n.source}: #{sources}]")
|
55
|
+
else
|
56
|
+
l10n("(#{@i18n.source}: #{sources})")
|
57
|
+
end
|
56
58
|
end
|
57
59
|
|
58
60
|
def bibdata_i18n(bibdata)
|
@@ -143,14 +145,40 @@ module IsoDoc
|
|
143
145
|
end
|
144
146
|
end
|
145
147
|
|
146
|
-
def
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
148
|
+
def table_footnotes(docxml)
|
149
|
+
docxml.xpath(ns("//table//fn"))
|
150
|
+
end
|
151
|
+
|
152
|
+
# if termsource xref has no SDO identifier, cite instead by full reference
|
153
|
+
def citeas(xmldoc)
|
154
|
+
super
|
155
|
+
xmldoc.xpath(ns("//fmt-origin")).each do |e|
|
156
|
+
fmt_origin_cite_full?(e) or next
|
157
|
+
bibitem = @bibitem_lookup[e["bibitemid"]]
|
158
|
+
cit = bibitem.at(ns("./formattedref")) or next
|
159
|
+
e["citeas"] = citeas_cleanup(to_xml(cit.children).strip)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
def fmt_origin_cite_full?(elem)
|
164
|
+
sem_xml_descendant?(elem) and return
|
165
|
+
id = elem["bibitemid"] or return
|
166
|
+
b = @bibitem_lookup[id] or return
|
167
|
+
!b.at(ns(<<~XPATH))
|
168
|
+
./docidentifier[not(#{SKIP_DOCID} or @scope = 'biblio-tag' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type='title')]
|
169
|
+
XPATH
|
170
|
+
end
|
171
|
+
|
172
|
+
def termsource_join_delim(_elem)
|
173
|
+
@lang == "ja" ? "、" : "; "
|
152
174
|
end
|
153
175
|
|
176
|
+
def source_join_delim(_elem)
|
177
|
+
@lang == "ja" ? "、" : "; "
|
178
|
+
end
|
179
|
+
|
180
|
+
def bracketed_refs_processing(docxml); end
|
181
|
+
|
154
182
|
include Init
|
155
183
|
end
|
156
184
|
end
|
@@ -1,14 +1,15 @@
|
|
1
1
|
module Metanorma
|
2
2
|
module Jis
|
3
3
|
class Converter < Iso::Converter
|
4
|
-
def norm_ref_preface(ref)
|
4
|
+
def norm_ref_preface(ref, isodoc)
|
5
5
|
if ref.at("./note[@type = 'boilerplate']")
|
6
6
|
unwrap_boilerplate_clauses(ref, ".")
|
7
7
|
else
|
8
8
|
pref = if ref_empty?(ref) then @i18n.norm_empty_pref
|
9
9
|
else @i18n.get[ref_dated(ref)]
|
10
10
|
end
|
11
|
-
ref.at("./title").next = "<p>#{pref}</p>"
|
11
|
+
#ref.at("./title").next = "<p>#{pref}</p>"
|
12
|
+
ref.at("./title").next = boilerplate_snippet_convert(pref, isodoc)
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
data/lib/metanorma/jis/front.rb
CHANGED
@@ -134,12 +134,12 @@ module Metanorma
|
|
134
134
|
|
135
135
|
def title(node, xml)
|
136
136
|
%w(en ja).each do |lang|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
137
|
+
title_full(node, xml, lang)
|
138
|
+
%w(intro main part).each do |w|
|
139
|
+
title_component(node, xml, lang, { name: w, abbr: w })
|
140
|
+
end
|
141
|
+
@amd and title_component(node, xml, lang,
|
142
|
+
{ name: "amendment", abbr: "amd" })
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- VERSION v2.1.
|
3
|
+
<!-- VERSION v2.1.3 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -455,14 +455,7 @@ normative or informative references, some split references into sections organiz
|
|
455
455
|
</ref>
|
456
456
|
</zeroOrMore>
|
457
457
|
<zeroOrMore>
|
458
|
-
<ref name="
|
459
|
-
<a:documentation>Bibliographic item cited in the document</a:documentation>
|
460
|
-
</ref>
|
461
|
-
<zeroOrMore>
|
462
|
-
<ref name="note">
|
463
|
-
<a:documentation>Annotation of the bibliographic item</a:documentation>
|
464
|
-
</ref>
|
465
|
-
</zeroOrMore>
|
458
|
+
<ref name="ReferenceEntry"/>
|
466
459
|
</zeroOrMore>
|
467
460
|
<zeroOrMore>
|
468
461
|
<ref name="references">
|
@@ -604,18 +597,21 @@ gives an explicit page orientation</a:documentation>
|
|
604
597
|
</element>
|
605
598
|
</optional>
|
606
599
|
</define>
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
<attribute name="hiddenref">
|
613
|
-
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
600
|
+
<define name="FnAttributes">
|
601
|
+
<ref name="RequiredId"/>
|
602
|
+
<optional>
|
603
|
+
<attribute name="hiddenref">
|
604
|
+
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
614
605
|
This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
|
615
|
-
|
606
|
+
<data type="boolean"/>
|
607
|
+
</attribute>
|
608
|
+
</optional>
|
609
|
+
<attribute name="reference">
|
610
|
+
<a:documentation>The number of the footnote, used to identify it visually</a:documentation>
|
616
611
|
</attribute>
|
617
|
-
</
|
618
|
-
</
|
612
|
+
</define>
|
613
|
+
</include>
|
614
|
+
<!-- end overrides -->
|
619
615
|
<define name="TdAttributes" combine="interleave">
|
620
616
|
<ref name="RequiredId"/>
|
621
617
|
<optional>
|
@@ -853,6 +849,17 @@ titlecase, or lowercase</a:documentation>
|
|
853
849
|
<value>informative</value>
|
854
850
|
</choice>
|
855
851
|
</define>
|
852
|
+
<define name="ReferenceEntry">
|
853
|
+
<a:documentation>Entry in bibliography</a:documentation>
|
854
|
+
<ref name="doc_bibitem">
|
855
|
+
<a:documentation>Bibliographic item cited in the document</a:documentation>
|
856
|
+
</ref>
|
857
|
+
<zeroOrMore>
|
858
|
+
<ref name="note">
|
859
|
+
<a:documentation>Annotation of the bibliographic item</a:documentation>
|
860
|
+
</ref>
|
861
|
+
</zeroOrMore>
|
862
|
+
</define>
|
856
863
|
<define name="doc_bibitem">
|
857
864
|
<a:documentation>Standardisation document representation of bibliographic entry</a:documentation>
|
858
865
|
<element name="bibitem">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-jis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: japanese_calendar
|