metanorma-iso 3.1.5 → 3.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 714a368be85c8da9ffe28d8fa5897da7d8b0dff0939c7b108681cc5720241513
4
- data.tar.gz: feb31751f9388342066e14b68dbd1589bddfe87fd6b7cf48100606f2b4c5e820
3
+ metadata.gz: f3ba54e8bd089ed40863fa57aad10fe877dd6b25e6750739da0633002396116f
4
+ data.tar.gz: ce7882d56cbe92bd8b199cceab33def08a9f993925a8619d0792a6c8b851d167
5
5
  SHA512:
6
- metadata.gz: eec64e6e178acbea0e0f391068c2cef244c22c4568490e5cf27c185497e132df5457e4bed8ffa03da71cd54fa66f55746ba83e5f67bb0ef38fd6e8b87129fbc9
7
- data.tar.gz: e8effac1511a8364303574f1ec1a3ff70188c9f528700fa2c5e3fb59f35caf5e7be439e9742718b61546cc2d39a41533a6032786323603a6fcfd802dcaf463b9
6
+ metadata.gz: 6374d26fe1c9735cbb7792a82f8bfcdd2d93d89a5450b26206f1462f672fc6490dc3f16a32c35bce5c61acf6d14ab03c8f4d207f53eaf901fb33b7b54090af8a
7
+ data.tar.gz: e7484d6860caa5fa96dcfa9fee1bd29f61d9c1bc70ef47a39a4278867e9c331aab50af18dd7105d6ca85832a1e0d458c0bc9b387b422e2e8526193fe176b7aab
@@ -1339,7 +1339,7 @@ span.TableFootnoteRef {
1339
1339
  font-size: {{footnotefontsize}};
1340
1340
  }
1341
1341
 
1342
- sup a {
1342
+ sup {
1343
1343
  vertical-align: super;
1344
1344
  font-size: 0.8em;
1345
1345
  }
@@ -655,7 +655,7 @@ span.TableFootnoteRef {
655
655
  font-size: $footnotefontsize;
656
656
  }
657
657
 
658
- sup a {
658
+ sup {
659
659
  vertical-align: super;
660
660
  font-size: 0.8em;
661
661
  }
@@ -1403,7 +1403,7 @@ a.footnote-number, a.TableFootnoteRef, span.TableFootnoteRef {
1403
1403
  font-size: {{footnotefontsize}};
1404
1404
  }
1405
1405
 
1406
- sup a {
1406
+ sup {
1407
1407
  vertical-align: super;
1408
1408
  font-size: 0.8em;
1409
1409
  }
@@ -688,7 +688,7 @@ a.footnote-number, a.TableFootnoteRef, span.TableFootnoteRef {
688
688
  font-size: $footnotefontsize;
689
689
  }
690
690
 
691
- sup a {
691
+ sup {
692
692
  vertical-align: super;
693
693
  font-size: 0.8em;
694
694
  }
@@ -12,6 +12,7 @@ price: Preis
12
12
  date_first_printing: Datum des ersten Drucks
13
13
  date_printing: "Datum des {{ var1 | ordinal_word: '', '' }} Drucks"
14
14
  descriptor: Deskriptor
15
+ reference: Referenz
15
16
  under_preparation: In Vorbereitung. (Stadium zum Zeitpunkt der Veröffentlichung %).
16
17
  withdrawn: Zurückgezogen.
17
18
  cancelled_and_replaced: Abgebrochen und ersetzt durch %.
@@ -25,8 +26,8 @@ voting_begins_on: Die Abstimmung beginnt am
25
26
  voting_terminates_on: Die Abstimmung endet am
26
27
  corrected_version: Korrigierte Version
27
28
  fast-track-procedue: Beschleunigtes Verfahren
28
- multiple_and: "%1 und %2"
29
- multiple_or: "%1 oder %2"
29
+ multiple_and: "%1 <span class='fmt-conn'>und</span> %2"
30
+ multiple_or: "%1 <span class='fmt-conn'>oder</span> %2"
30
31
  classification-UDC: UDK
31
32
  edition_ordinal_old: "{{ var1 | ordinal_num: 'edition', '' }} AUSGABE"
32
33
  edition_replacement: "Diese {{ var1 | ordinal_word: 'edition', '' }} Ausgabe ersetzt die {{ var2 | ordinal_word: 'edition', '' }} Ausgabe"
@@ -158,3 +159,6 @@ inflection:
158
159
  Deskriptor:
159
160
  sg: Deskriptor
160
161
  pl: Deskriptoren
162
+ Referenz:
163
+ sg: Referenz
164
+ pl: Referenzen
@@ -12,6 +12,7 @@ price: Price
12
12
  date_first_printing: Date of the first printing
13
13
  date_printing: "Date of the {{ var1 | ordinal_word: '', '' }} printing"
14
14
  descriptor: Descriptor
15
+ reference: Reference
15
16
  under_preparation: Under preparation. (Stage at the time of publication %).
16
17
  withdrawn: Withdrawn.
17
18
  cancelled_and_replaced: Cancelled and replaced by %.
@@ -27,8 +28,8 @@ voting_begins_on: Voting begins on
27
28
  voting_terminates_on: Voting terminates on
28
29
  corrected_version: Corrected version
29
30
  fast-track-procedure: Fast track procedure
30
- multiple_and: "%1 and %2"
31
- multiple_or: "%1 or %2"
31
+ multiple_and: "%1 <span class='fmt-conn'>and</span> %2"
32
+ multiple_or: "%1 <span class='fmt-conn'>or</span> %2"
32
33
  classification-UDC: UDC
33
34
  website: website
34
35
  formerly_id: "(formerly %)"
@@ -161,3 +162,6 @@ inflection:
161
162
  Descriptor:
162
163
  sg: Descriptor
163
164
  pl: Descriptors
165
+ Reference:
166
+ sg: Reference
167
+ pl: References
@@ -13,6 +13,7 @@ price: Prix
13
13
  date_first_printing: Date de la première impression
14
14
  date_printing: "Date de la {{ var1 | ordinal_word: '', 'f' }} impression"
15
15
  descriptor: Descripteur
16
+ reference: Référence
16
17
  under_preparation: En cours d'élaboration. (Stade au moment de la publication %).
17
18
  withdrawn: Retiré.
18
19
  cancelled_and_replaced: Annulé et remplacé par %.
@@ -159,3 +160,6 @@ inflection:
159
160
  Descripteur:
160
161
  sg: Descripteur
161
162
  pl: Descripteurs
163
+ Référence:
164
+ sg: Référence
165
+ pl: Références
@@ -1,4 +1,5 @@
1
1
  descriptor: 記述子
2
+ reference: 参考文献
2
3
  fast-track-procedure: ファストトラック手順
3
4
  availablefrom: 入手先
4
5
  website: ウェブサイト
@@ -7,6 +7,7 @@ all_rights_reserved: Все права защищены
7
7
  reference_number: Ссылочный номер
8
8
  reference_number_abbrev: Исх. №
9
9
  descriptor: Дескриптор
10
+ reference: Ссылка
10
11
  price_based_on: Цена рассчитана на % стр.
11
12
  price: Цена
12
13
  date_first_printing: Дата первой печати
@@ -159,3 +160,6 @@ inflection:
159
160
  Дескриптор:
160
161
  sg: Дескриптор
161
162
  pl: Дескрипторы
163
+ Ссылка:
164
+ sg: Ссылка
165
+ pl: Ссылки
@@ -8,6 +8,7 @@ reference_number: 参考编号
8
8
  reference_number_abbrev: 参考编号
9
9
  price_based_on: 价格基于%页
10
10
  descriptor: 描述符
11
+ reference: 参考文献
11
12
  under_preparation: 制定中(出版时最新状态为%)
12
13
  withdrawn: 撤回 .
13
14
  cancelled_and_replaced: 已取消并由%取代。
@@ -36,8 +36,8 @@ module IsoDoc
36
36
  end
37
37
 
38
38
  def bibrenderer(options = {})
39
- ::Relaton::Render::Iso::General.new(options.merge(language: @lang,
40
- i18nhash: @i18n.get))
39
+ ::Relaton::Render::Iso::General.new(options
40
+ .merge(language: @lang, script: @script, i18nhash: @i18n.get))
41
41
  end
42
42
 
43
43
  def amd?(_docxml)
@@ -1082,7 +1082,7 @@
1082
1082
  <xsl:when test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or ($layoutVersion = '1989' and $revision_date_num &lt;= 19981231)"><!-- copyright renders in the footer footer-preface-first_1987-1998--></xsl:when>
1083
1083
  <xsl:otherwise>
1084
1084
 
1085
- <xsl:call-template name="copyright-statement"/>
1085
+ <xsl:call-template name="inner-cover-page"/>
1086
1086
 
1087
1087
  </xsl:otherwise>
1088
1088
  </xsl:choose>
@@ -2849,7 +2849,8 @@
2849
2849
  </xsl:if> <!-- $isGenerateTableIF = 'false' -->
2850
2850
  </xsl:template> <!-- END cover-page -->
2851
2851
 
2852
- <xsl:template name="copyright-statement">
2852
+ <!-- copyright-statement -->
2853
+ <xsl:template name="inner-cover-page">
2853
2854
  <xsl:if test="normalize-space(/mn:metanorma/mn:boilerplate/mn:copyright-statement) != ''">
2854
2855
 
2855
2856
  <fo:page-sequence format="i" force-page-count="no-force">
@@ -7715,7 +7716,6 @@
7715
7716
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
7716
7717
 
7717
7718
  <xsl:template name="refine_feedback-statement-title-style">
7718
-
7719
7719
  </xsl:template>
7720
7720
 
7721
7721
  <xsl:attribute-set name="feedback-statement-p-style">
@@ -13827,15 +13827,22 @@
13827
13827
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
13828
13828
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
13829
13829
  </xsl:if>
13830
- </xsl:template>
13830
+ </xsl:template> <!-- refine_quote-style -->
13831
13831
 
13832
13832
  <xsl:attribute-set name="quote-source-style">
13833
13833
  <xsl:attribute name="text-align">right</xsl:attribute>
13834
- </xsl:attribute-set>
13834
+ </xsl:attribute-set> <!-- quote-source-style -->
13835
13835
 
13836
13836
  <xsl:template name="refine_quote-source-style">
13837
13837
  </xsl:template>
13838
13838
 
13839
+ <xsl:attribute-set name="source-style">
13840
+ </xsl:attribute-set> <!-- source-style -->
13841
+
13842
+ <xsl:template name="refine_source-style">
13843
+
13844
+ </xsl:template> <!-- refine_source-style -->
13845
+
13839
13846
  <!-- ====== -->
13840
13847
  <!-- quote -->
13841
13848
  <!-- source -->
@@ -13883,7 +13890,9 @@
13883
13890
  </xsl:if>
13884
13891
  <xsl:choose>
13885
13892
  <xsl:when test="not(parent::quote)">
13886
- <fo:block>
13893
+ <fo:block xsl:use-attribute-sets="source-style">
13894
+ <xsl:call-template name="refine_source-style"/>
13895
+
13887
13896
  <xsl:call-template name="insert_basic_link">
13888
13897
  <xsl:with-param name="element">
13889
13898
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -16044,7 +16053,7 @@
16044
16053
  <xsl:attribute name="baseline-shift">15%</xsl:attribute>
16045
16054
  </xsl:if>
16046
16055
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
16047
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
16056
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if><!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas'"></xsl:if> -->
16048
16057
  </xsl:template> <!-- refine_fn-reference-style -->
16049
16058
 
16050
16059
  <xsl:attribute-set name="fn-style">
@@ -16055,7 +16064,9 @@
16055
16064
  </xsl:template>
16056
16065
 
16057
16066
  <xsl:attribute-set name="fn-num-style">
16067
+ <xsl:attribute name="role">Reference</xsl:attribute>
16058
16068
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
16069
+ <xsl:attribute name="font-size">65%</xsl:attribute>
16059
16070
  <xsl:attribute name="font-size">80%</xsl:attribute>
16060
16071
  <!--<xsl:attribute name="vertical-align">super</xsl:attribute> -->
16061
16072
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
@@ -16149,26 +16160,9 @@
16149
16160
  <xsl:variable name="ref_id" select="@target"/>
16150
16161
 
16151
16162
  <xsl:variable name="footnote_inline">
16152
- <fo:inline role="Reference">
16163
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
16153
16164
 
16154
- <xsl:variable name="fn_styles">
16155
- <xsl:choose>
16156
- <xsl:when test="ancestor::mn:bibitem">
16157
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
16158
- <xsl:call-template name="refine_bibitem-note-fn-style"/>
16159
- </fn_styles>
16160
- </xsl:when>
16161
- <xsl:otherwise>
16162
- <fn_styles xsl:use-attribute-sets="fn-num-style">
16163
- <xsl:call-template name="refine_fn-num-style"/>
16164
- </fn_styles>
16165
- </xsl:otherwise>
16166
- </xsl:choose>
16167
- </xsl:variable>
16168
-
16169
- <xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
16170
- <xsl:copy-of select="."/>
16171
- </xsl:for-each>
16165
+ <xsl:call-template name="refine_fn-num-style"/>
16172
16166
 
16173
16167
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
16174
16168
  <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
@@ -16178,7 +16172,7 @@
16178
16172
  <xsl:attribute name="font-size">70%</xsl:attribute>
16179
16173
  </xsl:if>
16180
16174
 
16181
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
16175
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if>
16182
16176
 
16183
16177
  <xsl:call-template name="insert_basic_link">
16184
16178
  <xsl:with-param name="element">
@@ -16483,32 +16477,6 @@
16483
16477
  <xsl:template name="refine_bibitem-non-normative-list-body-style">
16484
16478
  </xsl:template>
16485
16479
 
16486
- <!-- footnote reference number for bibitem, in the text -->
16487
- <xsl:attribute-set name="bibitem-note-fn-style">
16488
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
16489
- <xsl:attribute name="font-size">65%</xsl:attribute>
16490
- <xsl:attribute name="font-size">8pt</xsl:attribute>
16491
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
16492
- </xsl:attribute-set> <!-- bibitem-note-fn-style -->
16493
-
16494
- <xsl:template name="refine_bibitem-note-fn-style">
16495
- </xsl:template>
16496
-
16497
- <!-- footnote number on the page bottom -->
16498
- <xsl:attribute-set name="bibitem-note-fn-number-style">
16499
- <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
16500
- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
16501
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
16502
- </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
16503
-
16504
- <!-- footnote body (text) on the page bottom -->
16505
- <xsl:attribute-set name="bibitem-note-fn-body-style">
16506
- <xsl:attribute name="font-size">10pt</xsl:attribute>
16507
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
16508
- <xsl:attribute name="start-indent">0pt</xsl:attribute>
16509
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
16510
- </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
16511
-
16512
16480
  <xsl:attribute-set name="references-non-normative-style">
16513
16481
  </xsl:attribute-set> <!-- references-non-normative-style -->
16514
16482
 
@@ -18887,6 +18855,17 @@
18887
18855
  </xsl:attribute-set>
18888
18856
 
18889
18857
  <xsl:template name="refine_clause-style">
18858
+ <!-- commented for https://github.com/metanorma/metanorma-ribose/issues/421 -->
18859
+ <!-- <xsl:if test="$namespace = 'rsd'">
18860
+ <xsl:variable name="level">
18861
+ <xsl:call-template name="getLevel">
18862
+ <xsl:with-param name="depth" select="mn:fmt-title/@depth"/>
18863
+ </xsl:call-template>
18864
+ </xsl:variable>
18865
+ <xsl:if test="$level &gt;= 4">
18866
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
18867
+ </xsl:if>
18868
+ </xsl:if> -->
18890
18869
  </xsl:template>
18891
18870
 
18892
18871
  <!-- main sections -->
@@ -1082,7 +1082,7 @@
1082
1082
  <xsl:when test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or ($layoutVersion = '1989' and $revision_date_num &lt;= 19981231)"><!-- copyright renders in the footer footer-preface-first_1987-1998--></xsl:when>
1083
1083
  <xsl:otherwise>
1084
1084
 
1085
- <xsl:call-template name="copyright-statement"/>
1085
+ <xsl:call-template name="inner-cover-page"/>
1086
1086
 
1087
1087
  </xsl:otherwise>
1088
1088
  </xsl:choose>
@@ -2849,7 +2849,8 @@
2849
2849
  </xsl:if> <!-- $isGenerateTableIF = 'false' -->
2850
2850
  </xsl:template> <!-- END cover-page -->
2851
2851
 
2852
- <xsl:template name="copyright-statement">
2852
+ <!-- copyright-statement -->
2853
+ <xsl:template name="inner-cover-page">
2853
2854
  <xsl:if test="normalize-space(/mn:metanorma/mn:boilerplate/mn:copyright-statement) != ''">
2854
2855
 
2855
2856
  <fo:page-sequence format="i" force-page-count="no-force">
@@ -7715,7 +7716,6 @@
7715
7716
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
7716
7717
 
7717
7718
  <xsl:template name="refine_feedback-statement-title-style">
7718
-
7719
7719
  </xsl:template>
7720
7720
 
7721
7721
  <xsl:attribute-set name="feedback-statement-p-style">
@@ -13827,15 +13827,22 @@
13827
13827
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
13828
13828
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
13829
13829
  </xsl:if>
13830
- </xsl:template>
13830
+ </xsl:template> <!-- refine_quote-style -->
13831
13831
 
13832
13832
  <xsl:attribute-set name="quote-source-style">
13833
13833
  <xsl:attribute name="text-align">right</xsl:attribute>
13834
- </xsl:attribute-set>
13834
+ </xsl:attribute-set> <!-- quote-source-style -->
13835
13835
 
13836
13836
  <xsl:template name="refine_quote-source-style">
13837
13837
  </xsl:template>
13838
13838
 
13839
+ <xsl:attribute-set name="source-style">
13840
+ </xsl:attribute-set> <!-- source-style -->
13841
+
13842
+ <xsl:template name="refine_source-style">
13843
+
13844
+ </xsl:template> <!-- refine_source-style -->
13845
+
13839
13846
  <!-- ====== -->
13840
13847
  <!-- quote -->
13841
13848
  <!-- source -->
@@ -13883,7 +13890,9 @@
13883
13890
  </xsl:if>
13884
13891
  <xsl:choose>
13885
13892
  <xsl:when test="not(parent::quote)">
13886
- <fo:block>
13893
+ <fo:block xsl:use-attribute-sets="source-style">
13894
+ <xsl:call-template name="refine_source-style"/>
13895
+
13887
13896
  <xsl:call-template name="insert_basic_link">
13888
13897
  <xsl:with-param name="element">
13889
13898
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -16044,7 +16053,7 @@
16044
16053
  <xsl:attribute name="baseline-shift">15%</xsl:attribute>
16045
16054
  </xsl:if>
16046
16055
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
16047
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
16056
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if><!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas'"></xsl:if> -->
16048
16057
  </xsl:template> <!-- refine_fn-reference-style -->
16049
16058
 
16050
16059
  <xsl:attribute-set name="fn-style">
@@ -16055,7 +16064,9 @@
16055
16064
  </xsl:template>
16056
16065
 
16057
16066
  <xsl:attribute-set name="fn-num-style">
16067
+ <xsl:attribute name="role">Reference</xsl:attribute>
16058
16068
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
16069
+ <xsl:attribute name="font-size">65%</xsl:attribute>
16059
16070
  <xsl:attribute name="font-size">80%</xsl:attribute>
16060
16071
  <!--<xsl:attribute name="vertical-align">super</xsl:attribute> -->
16061
16072
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
@@ -16149,26 +16160,9 @@
16149
16160
  <xsl:variable name="ref_id" select="@target"/>
16150
16161
 
16151
16162
  <xsl:variable name="footnote_inline">
16152
- <fo:inline role="Reference">
16163
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
16153
16164
 
16154
- <xsl:variable name="fn_styles">
16155
- <xsl:choose>
16156
- <xsl:when test="ancestor::mn:bibitem">
16157
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
16158
- <xsl:call-template name="refine_bibitem-note-fn-style"/>
16159
- </fn_styles>
16160
- </xsl:when>
16161
- <xsl:otherwise>
16162
- <fn_styles xsl:use-attribute-sets="fn-num-style">
16163
- <xsl:call-template name="refine_fn-num-style"/>
16164
- </fn_styles>
16165
- </xsl:otherwise>
16166
- </xsl:choose>
16167
- </xsl:variable>
16168
-
16169
- <xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
16170
- <xsl:copy-of select="."/>
16171
- </xsl:for-each>
16165
+ <xsl:call-template name="refine_fn-num-style"/>
16172
16166
 
16173
16167
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
16174
16168
  <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
@@ -16178,7 +16172,7 @@
16178
16172
  <xsl:attribute name="font-size">70%</xsl:attribute>
16179
16173
  </xsl:if>
16180
16174
 
16181
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
16175
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if>
16182
16176
 
16183
16177
  <xsl:call-template name="insert_basic_link">
16184
16178
  <xsl:with-param name="element">
@@ -16483,32 +16477,6 @@
16483
16477
  <xsl:template name="refine_bibitem-non-normative-list-body-style">
16484
16478
  </xsl:template>
16485
16479
 
16486
- <!-- footnote reference number for bibitem, in the text -->
16487
- <xsl:attribute-set name="bibitem-note-fn-style">
16488
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
16489
- <xsl:attribute name="font-size">65%</xsl:attribute>
16490
- <xsl:attribute name="font-size">8pt</xsl:attribute>
16491
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
16492
- </xsl:attribute-set> <!-- bibitem-note-fn-style -->
16493
-
16494
- <xsl:template name="refine_bibitem-note-fn-style">
16495
- </xsl:template>
16496
-
16497
- <!-- footnote number on the page bottom -->
16498
- <xsl:attribute-set name="bibitem-note-fn-number-style">
16499
- <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
16500
- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
16501
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
16502
- </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
16503
-
16504
- <!-- footnote body (text) on the page bottom -->
16505
- <xsl:attribute-set name="bibitem-note-fn-body-style">
16506
- <xsl:attribute name="font-size">10pt</xsl:attribute>
16507
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
16508
- <xsl:attribute name="start-indent">0pt</xsl:attribute>
16509
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
16510
- </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
16511
-
16512
16480
  <xsl:attribute-set name="references-non-normative-style">
16513
16481
  </xsl:attribute-set> <!-- references-non-normative-style -->
16514
16482
 
@@ -18887,6 +18855,17 @@
18887
18855
  </xsl:attribute-set>
18888
18856
 
18889
18857
  <xsl:template name="refine_clause-style">
18858
+ <!-- commented for https://github.com/metanorma/metanorma-ribose/issues/421 -->
18859
+ <!-- <xsl:if test="$namespace = 'rsd'">
18860
+ <xsl:variable name="level">
18861
+ <xsl:call-template name="getLevel">
18862
+ <xsl:with-param name="depth" select="mn:fmt-title/@depth"/>
18863
+ </xsl:call-template>
18864
+ </xsl:variable>
18865
+ <xsl:if test="$level &gt;= 4">
18866
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
18867
+ </xsl:if>
18868
+ </xsl:if> -->
18890
18869
  </xsl:template>
18891
18870
 
18892
18871
  <!-- main sections -->
@@ -211,6 +211,14 @@ module IsoDoc
211
211
  end
212
212
  end
213
213
 
214
+ def citeas_cleanup1(citeas)
215
+ ret = super
216
+ if /^\[\d+\]$/.match?(ret)
217
+ ret = @i18n.l10n("#{@i18n.reference} #{ret}")
218
+ end
219
+ ret
220
+ end
221
+
214
222
  include Init
215
223
  end
216
224
  end
@@ -56,7 +56,7 @@ module IsoDoc
56
56
  target&.gsub(/<[^<>]+>/, "")&.match(/^IEV$|^IEC 60050-/)
57
57
  end
58
58
 
59
- # ISO has not bothered to communicate to us what most of these
59
+ # ISO has not bothered to communicate to us what most of these
60
60
  # span classes mean
61
61
  LOCALITY2SPAN = {
62
62
  annex: "citeapp",
@@ -147,6 +147,77 @@ module IsoDoc
147
147
  locality_span_wrap(super, @xrefs.anchor(node["target"], :subtype) ||
148
148
  @xrefs.anchor(node["target"], :type))
149
149
  end
150
+
151
+ def origin(docxml)
152
+ super
153
+ bracketed_refs_processing(docxml)
154
+ end
155
+
156
+ # style [1] references as [Reference 1], eref or origin
157
+ def bracketed_refs_processing(docxml)
158
+ (docxml.xpath(ns("//semx[@element = 'eref']")) -
159
+ docxml.xpath(ns("//semx[@element = 'erefstack']//semx[@element = 'eref']")))
160
+ .each { |n| bracket_eref_style(n) }
161
+ docxml.xpath(ns("//semx[@element = 'erefstack']")).each do |n|
162
+ bracket_erefstack_style(n)
163
+ end
164
+ docxml.xpath(ns("//semx[@element = 'origin']")).each do |n|
165
+ bracket_origin_style(n)
166
+ end
167
+ end
168
+
169
+ def bracket_eref_style(elem)
170
+ semx = bracket_eref_original(elem) or return
171
+ if semx["style"] == "superscript"
172
+ elem.children.wrap("<sup></sup>")
173
+ remove_preceding_space(elem)
174
+ else
175
+ r = @i18n.reference
176
+ elem.add_first_child l10n("#{r} ")
177
+ end
178
+ end
179
+
180
+ # is the eref corresponding to this semx a simple [n] reference?
181
+ def bracket_eref_original(elem)
182
+ semx = elem.document.at("//*[@id = '#{elem['source']}']") or return
183
+ non_locality_elems(semx).empty? or return
184
+ /^\[\d+\]$/.match?(semx["citeas"]) or return
185
+ semx
186
+ end
187
+
188
+ def bracket_erefstack_style(elem)
189
+ semx, erefstack_orig = bracket_erefstack_style_prep(elem)
190
+ semx.empty? and return
191
+ if erefstack_orig && erefstack_orig["style"]
192
+ elem.children.each do |e|
193
+ e.name == "span" and e.remove
194
+ e.text.strip.empty? and e.remove
195
+ end
196
+ elem.children.wrap("<sup></sup>")
197
+ remove_preceding_space(elem)
198
+ else
199
+ r = @i18n.inflect(@i18n.reference, number: "pl")
200
+ elem.add_first_child l10n("#{r} ")
201
+ end
202
+ end
203
+
204
+ def bracket_erefstack_style_prep(elem)
205
+ semx = elem.xpath(ns(".//semx[@element = 'eref']"))
206
+ .map { |e| bracket_eref_original(e) }.compact
207
+ erefstack_orig = elem.document.at("//*[@id = '#{elem['source']}']")
208
+ [semx, erefstack_orig]
209
+ end
210
+
211
+ def bracket_origin_style(elem)
212
+ bracket_eref_style(elem)
213
+ end
214
+
215
+ def remove_preceding_space(elem)
216
+ # Find the preceding text node that has actual content
217
+ prec = elem.at("./preceding-sibling::text()" \
218
+ "[normalize-space(.) != ''][1]") or return
219
+ prec.content.end_with?(" ") and prec.content = prec.content.rstrip
220
+ end
150
221
  end
151
222
  end
152
223
  end
@@ -169,7 +169,7 @@ module IsoDoc
169
169
 
170
170
  def termref_parse(node, out)
171
171
  out.p **termref_attrs do |p|
172
- node.children.each { |n| parse(n, p) }
172
+ children_parse(node, p)
173
173
  end
174
174
  end
175
175
 
@@ -181,7 +181,7 @@ module IsoDoc
181
181
  def figure_name_parse(node, div, name)
182
182
  name.nil? and return
183
183
  div.p **figure_name_attrs(node) do |p|
184
- name.children.each { |n| parse(n, p) }
184
+ children_parse(name, p)
185
185
  end
186
186
  end
187
187
 
@@ -193,7 +193,7 @@ module IsoDoc
193
193
  def table_title_parse(node, out)
194
194
  name = node.at(ns("./fmt-name")) or return
195
195
  out.p **table_title_attrs(node) do |p|
196
- name&.children&.each { |n| parse(n, p) }
196
+ children_parse(name, p)
197
197
  end
198
198
  end
199
199
 
@@ -158,7 +158,6 @@ module IsoDoc
158
158
  s.xpath(ns(".//appendix//ol")) - s.xpath(ns(".//ol//ol"))
159
159
  c = Counter.new
160
160
  notes.noblank.each do |n|
161
- # n["id"] ||= "_#{UUIDTools::UUID.random_create}"
162
161
  @anchors[n["id"]] = anchor_struct(increment_label(notes, n, c), n,
163
162
  @labels["list"], "list",
164
163
  { unnumb: false, container: true })
@@ -203,7 +202,6 @@ module IsoDoc
203
202
  end
204
203
 
205
204
  def xref_to_modspec(id, table_label)
206
- # (@anchors[id] && !@anchors[id][:has_modspec]) or return
207
205
  (@anchors[id] && !@anchors[id][:has_table_prefix]) or return
208
206
  @anchors[id][:has_table_prefix] = true
209
207
  x = @anchors_previous[id][:xref_bare] || @anchors_previous[id][:xref]
@@ -23,7 +23,6 @@ module IsoDoc
23
23
  { label:, xref:, elem: @labels["section"],
24
24
  title: clause_title(clause), level: level, type: "clause" }
25
25
  elsif level > 1
26
- #num = semx(clause, num)
27
26
  @anchors[clause["id"]] =
28
27
  { label: num, level: level, xref: num, subtype: "clause" }
29
28
  else super end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "3.1.5".freeze
3
+ VERSION = "3.1.6".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.5
4
+ version: 3.1.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-15 00:00:00.000000000 Z
11
+ date: 2025-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc