metanorma-m3aawg 2.1.11 → 2.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 623483216c999b2f050f12bbae3581ecae497f1c538d4900959d9a582e75c392
4
- data.tar.gz: 915098a1b045abbceb8cd066b6bdde751cc0ba30fc6aa9956e8f4e03ed27eeb0
3
+ metadata.gz: 7063dbb2d2913a6dd0f2c6dc57e59093d49a47fe58054e7466627471480d16f5
4
+ data.tar.gz: a2e88be007d2b2f03cb10e0f1e8a14b52bdf0885d561109a3877f6eb42323bbb
5
5
  SHA512:
6
- metadata.gz: ce0b5f84b4d3e5b626f034d3f7e2723d1354de3146c261727b6d16569e0cb83c5eb22153f6f08eccadfdc1946e482397bd1fe02093328b3e5d540db3e6f98c5d
7
- data.tar.gz: 7598e43f999b3f356150c6a19690fa21e1cd138d23c7f14265559f8c2305f0e3cef9d490f2f1080df90345c530cf2fa52b73ff8127f422ed7c393d52fd7bbbe2
6
+ metadata.gz: 6a59bb5425e6fad085e9ecf00b1db6fb6c509a47ea0c49abeb30be44e62dcef94f53f33738dd7d11c87e4e99db4113bb070d95bbbb7fc06188849e561055053c
7
+ data.tar.gz: 9b3445fa1af9b8e0f71aab50dd18827e0e0f18b562fa2f627fc3180ecf226c372529f6f9ebff4cfc2c73755f0417cc421153a8a48abff3030c33b559165af4c5
@@ -51,9 +51,9 @@
51
51
  </fo:simple-page-master>
52
52
 
53
53
  <fo:simple-page-master master-name="last" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
54
- <fo:region-body margin-top="20mm" margin-bottom="53mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
54
+ <fo:region-body margin-top="20mm" margin-bottom="54mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
55
55
  <fo:region-before region-name="header" extent="{$marginTop}mm"/>
56
- <fo:region-after region-name="footer-last" extent="53mm"/>
56
+ <fo:region-after region-name="footer-last" extent="53.2mm"/>
57
57
  <fo:region-start region-name="left-region" extent="17.3mm"/>
58
58
  <fo:region-end region-name="right-region" extent="17.3mm"/>
59
59
  </fo:simple-page-master>
@@ -104,7 +104,7 @@
104
104
  </fo:block-container>
105
105
  </fo:static-content>
106
106
  <fo:static-content flow-name="footer" role="artifact">
107
- <fo:block-container height="31mm" font-size="10pt">
107
+ <fo:block-container font-size="10pt">
108
108
  <fo:block text-align-last="justify" margin-top="2mm">
109
109
  <fo:inline font-weight="bold">
110
110
  <fo:inline>M<fo:inline font-size="6.5pt" vertical-align="super">3</fo:inline>AAWG </fo:inline>
@@ -216,7 +216,7 @@
216
216
  <xsl:for-each select="$contents//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
217
217
  <xsl:choose>
218
218
  <xsl:when test="@section = ''">
219
- <fo:table table-layout="fixed" width="100%">
219
+ <fo:table table-layout="fixed" width="100%" id="__internal_layout__price_toc_{generate-id()}">
220
220
  <fo:table-column column-width="180mm"/>
221
221
  <fo:table-body>
222
222
  <fo:table-row height="6mm">
@@ -241,7 +241,7 @@
241
241
  </fo:table>
242
242
  </xsl:when>
243
243
  <xsl:otherwise>
244
- <fo:table table-layout="fixed" width="100%">
244
+ <fo:table table-layout="fixed" width="100%" id="__internal_layout__price_toc_{generate-id()}">
245
245
  <fo:table-column column-width="5mm"/> <!-- 25mm -->
246
246
  <fo:table-column column-width="175mm"/> <!-- 155mm -->
247
247
  <fo:table-body>
@@ -1051,6 +1051,14 @@
1051
1051
 
1052
1052
  </xsl:attribute-set>
1053
1053
 
1054
+ <xsl:attribute-set name="pre-style">
1055
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1056
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1057
+
1058
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1059
+
1060
+ </xsl:attribute-set>
1061
+
1054
1062
  <xsl:attribute-set name="permission-style">
1055
1063
 
1056
1064
  </xsl:attribute-set>
@@ -1160,6 +1168,11 @@
1160
1168
  </xsl:variable>
1161
1169
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
1162
1170
 
1171
+ <xsl:variable name="table-cell-border_">
1172
+
1173
+ </xsl:variable>
1174
+ <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
1175
+
1163
1176
  <xsl:attribute-set name="table-container-style">
1164
1177
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1165
1178
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -1169,8 +1182,6 @@
1169
1182
  <xsl:attribute-set name="table-style">
1170
1183
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1171
1184
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
1172
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1173
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1174
1185
 
1175
1186
  </xsl:attribute-set><!-- table-style -->
1176
1187
 
@@ -2266,10 +2277,18 @@
2266
2277
  <xsl:variable name="table_attributes">
2267
2278
 
2268
2279
  <xsl:element name="table_attributes" use-attribute-sets="table-style">
2280
+
2281
+ <xsl:if test="$margin-side != 0">
2282
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2283
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2284
+ </xsl:if>
2285
+
2269
2286
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2270
2287
 
2271
- <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2272
- <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2288
+ <xsl:if test="$margin-side != 0">
2289
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2290
+ <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2291
+ </xsl:if>
2273
2292
 
2274
2293
  </xsl:element>
2275
2294
  </xsl:variable>
@@ -3025,6 +3044,10 @@
3025
3044
  <xsl:template match="*[local-name()='tr']">
3026
3045
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3027
3046
 
3047
+ <xsl:if test="*[local-name() = 'th']">
3048
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3049
+ </xsl:if>
3050
+
3028
3051
  <xsl:call-template name="setTableRowAttributes"/>
3029
3052
  <xsl:apply-templates/>
3030
3053
  </fo:table-row>
@@ -4992,6 +5015,9 @@
4992
5015
  <xsl:value-of select="substring($str, 2)"/>
4993
5016
  </xsl:template>
4994
5017
 
5018
+ <!-- ======================================= -->
5019
+ <!-- math -->
5020
+ <!-- ======================================= -->
4995
5021
  <xsl:template match="mathml:math">
4996
5022
  <xsl:variable name="isAdded" select="@added"/>
4997
5023
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -5042,14 +5068,57 @@
5042
5068
  <xsl:value-of select="$comment_text"/>
5043
5069
  </xsl:template>
5044
5070
 
5071
+ <xsl:template match="*[local-name() = 'asciimath']">
5072
+ <xsl:param name="process" select="'false'"/>
5073
+ <xsl:if test="$process = 'true'">
5074
+ <xsl:apply-templates/>
5075
+ </xsl:if>
5076
+ </xsl:template>
5077
+
5078
+ <xsl:template match="*[local-name() = 'latexmath']"/>
5079
+
5080
+ <xsl:template name="getMathml_asciimath_text">
5081
+ <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
5082
+ <xsl:variable name="latexmath">
5083
+
5084
+ </xsl:variable>
5085
+ <xsl:variable name="asciimath_text_following">
5086
+ <xsl:choose>
5087
+ <xsl:when test="normalize-space($latexmath) != ''">
5088
+ <xsl:value-of select="$latexmath"/>
5089
+ </xsl:when>
5090
+ <xsl:when test="normalize-space($asciimath) != ''">
5091
+ <xsl:value-of select="$asciimath"/>
5092
+ </xsl:when>
5093
+ <xsl:otherwise>
5094
+ <xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
5095
+ </xsl:otherwise>
5096
+ </xsl:choose>
5097
+ </xsl:variable>
5098
+ <xsl:variable name="asciimath_text_">
5099
+ <xsl:choose>
5100
+ <xsl:when test="normalize-space($asciimath_text_following) != ''">
5101
+ <xsl:value-of select="$asciimath_text_following"/>
5102
+ </xsl:when>
5103
+ <xsl:otherwise>
5104
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
5105
+ </xsl:otherwise>
5106
+ </xsl:choose>
5107
+ </xsl:variable>
5108
+ <xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
5109
+ <xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
5110
+ <xsl:value-of select="$asciimath_text"/>
5111
+ </xsl:template>
5112
+
5045
5113
  <xsl:template name="mathml_instream_object">
5046
- <xsl:param name="comment_text"/>
5114
+ <xsl:param name="asciimath_text"/>
5047
5115
  <xsl:param name="mathml_content"/>
5048
5116
 
5049
- <xsl:variable name="comment_text_">
5117
+ <xsl:variable name="asciimath_text_">
5050
5118
  <xsl:choose>
5051
- <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
5052
- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
5119
+ <xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
5120
+ <!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
5121
+ <xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
5053
5122
  </xsl:choose>
5054
5123
  </xsl:variable>
5055
5124
 
@@ -5066,10 +5135,10 @@
5066
5135
  </xsl:attribute>
5067
5136
 
5068
5137
  <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
5069
- <xsl:if test="normalize-space($comment_text_) != ''">
5138
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
5070
5139
  <!-- put Mathin Alternate Text -->
5071
5140
  <xsl:attribute name="fox:alt-text">
5072
- <xsl:value-of select="$comment_text_"/>
5141
+ <xsl:value-of select="$asciimath_text_"/>
5073
5142
  </xsl:attribute>
5074
5143
  </xsl:if>
5075
5144
  <!-- </xsl:if> -->
@@ -5142,6 +5211,29 @@
5142
5211
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
5143
5212
  </xsl:template>
5144
5213
 
5214
+ <!-- Examples:
5215
+ <stem type="AsciiMath">x = 1</stem>
5216
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
5217
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
5218
+ -->
5219
+ <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
5220
+ <fo:inline xsl:use-attribute-sets="mathml-style">
5221
+
5222
+ <xsl:choose>
5223
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
5224
+ <xsl:otherwise>
5225
+ <xsl:apply-templates>
5226
+ <xsl:with-param name="process">true</xsl:with-param>
5227
+ </xsl:apply-templates>
5228
+ </xsl:otherwise>
5229
+ </xsl:choose>
5230
+
5231
+ </fo:inline>
5232
+ </xsl:template>
5233
+ <!-- ======================================= -->
5234
+ <!-- END: math -->
5235
+ <!-- ======================================= -->
5236
+
5145
5237
  <xsl:template match="*[local-name()='localityStack']"/>
5146
5238
 
5147
5239
  <xsl:template match="*[local-name()='link']" name="link">
@@ -6484,9 +6576,9 @@
6484
6576
  <xsl:apply-templates mode="contents_item"/>
6485
6577
  </xsl:template>
6486
6578
 
6487
- <!-- ====== -->
6488
- <!-- sourcecode -->
6489
- <!-- ====== -->
6579
+ <!-- =============== -->
6580
+ <!-- sourcecode -->
6581
+ <!-- =============== -->
6490
6582
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
6491
6583
 
6492
6584
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
@@ -6783,8 +6875,22 @@
6783
6875
  </fo:block>
6784
6876
  </xsl:if>
6785
6877
  </xsl:template>
6786
- <!-- ====== -->
6787
- <!-- ====== -->
6878
+ <!-- =============== -->
6879
+ <!-- END sourcecode -->
6880
+ <!-- =============== -->
6881
+
6882
+ <!-- =============== -->
6883
+ <!-- pre -->
6884
+ <!-- =============== -->
6885
+ <xsl:template match="*[local-name()='pre']" name="pre">
6886
+ <fo:block xsl:use-attribute-sets="pre-style">
6887
+ <xsl:copy-of select="@id"/>
6888
+ <xsl:apply-templates/>
6889
+ </fo:block>
6890
+ </xsl:template>
6891
+ <!-- =============== -->
6892
+ <!-- pre -->
6893
+ <!-- =============== -->
6788
6894
 
6789
6895
  <!-- ========== -->
6790
6896
  <!-- permission -->
@@ -9339,13 +9445,14 @@
9339
9445
  </xsl:template>
9340
9446
 
9341
9447
  <xsl:template name="setId">
9448
+ <xsl:param name="prefix"/>
9342
9449
  <xsl:attribute name="id">
9343
9450
  <xsl:choose>
9344
9451
  <xsl:when test="@id">
9345
- <xsl:value-of select="@id"/>
9452
+ <xsl:value-of select="concat($prefix, @id)"/>
9346
9453
  </xsl:when>
9347
9454
  <xsl:otherwise>
9348
- <xsl:value-of select="generate-id()"/>
9455
+ <xsl:value-of select="concat($prefix, generate-id())"/>
9349
9456
  </xsl:otherwise>
9350
9457
  </xsl:choose>
9351
9458
  </xsl:attribute>
@@ -51,9 +51,9 @@
51
51
  </fo:simple-page-master>
52
52
 
53
53
  <fo:simple-page-master master-name="last" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
54
- <fo:region-body margin-top="20mm" margin-bottom="53mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
54
+ <fo:region-body margin-top="20mm" margin-bottom="54mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
55
55
  <fo:region-before region-name="header" extent="{$marginTop}mm"/>
56
- <fo:region-after region-name="footer-last" extent="53mm"/>
56
+ <fo:region-after region-name="footer-last" extent="53.2mm"/>
57
57
  <fo:region-start region-name="left-region" extent="17.3mm"/>
58
58
  <fo:region-end region-name="right-region" extent="17.3mm"/>
59
59
  </fo:simple-page-master>
@@ -104,7 +104,7 @@
104
104
  </fo:block-container>
105
105
  </fo:static-content>
106
106
  <fo:static-content flow-name="footer" role="artifact">
107
- <fo:block-container height="31mm" font-size="10pt">
107
+ <fo:block-container font-size="10pt">
108
108
  <fo:block text-align-last="justify" margin-top="2mm">
109
109
  <fo:inline font-weight="bold">
110
110
  <fo:inline>M<fo:inline font-size="6.5pt" vertical-align="super">3</fo:inline>AAWG </fo:inline>
@@ -216,7 +216,7 @@
216
216
  <xsl:for-each select="$contents//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
217
217
  <xsl:choose>
218
218
  <xsl:when test="@section = ''">
219
- <fo:table table-layout="fixed" width="100%">
219
+ <fo:table table-layout="fixed" width="100%" id="__internal_layout__price_toc_{generate-id()}">
220
220
  <fo:table-column column-width="180mm"/>
221
221
  <fo:table-body>
222
222
  <fo:table-row height="6mm">
@@ -241,7 +241,7 @@
241
241
  </fo:table>
242
242
  </xsl:when>
243
243
  <xsl:otherwise>
244
- <fo:table table-layout="fixed" width="100%">
244
+ <fo:table table-layout="fixed" width="100%" id="__internal_layout__price_toc_{generate-id()}">
245
245
  <fo:table-column column-width="5mm"/> <!-- 25mm -->
246
246
  <fo:table-column column-width="175mm"/> <!-- 155mm -->
247
247
  <fo:table-body>
@@ -1051,6 +1051,14 @@
1051
1051
 
1052
1052
  </xsl:attribute-set>
1053
1053
 
1054
+ <xsl:attribute-set name="pre-style">
1055
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1056
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1057
+
1058
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1059
+
1060
+ </xsl:attribute-set>
1061
+
1054
1062
  <xsl:attribute-set name="permission-style">
1055
1063
 
1056
1064
  </xsl:attribute-set>
@@ -1160,6 +1168,11 @@
1160
1168
  </xsl:variable>
1161
1169
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
1162
1170
 
1171
+ <xsl:variable name="table-cell-border_">
1172
+
1173
+ </xsl:variable>
1174
+ <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
1175
+
1163
1176
  <xsl:attribute-set name="table-container-style">
1164
1177
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1165
1178
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -1169,8 +1182,6 @@
1169
1182
  <xsl:attribute-set name="table-style">
1170
1183
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1171
1184
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
1172
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1173
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1174
1185
 
1175
1186
  </xsl:attribute-set><!-- table-style -->
1176
1187
 
@@ -2266,10 +2277,18 @@
2266
2277
  <xsl:variable name="table_attributes">
2267
2278
 
2268
2279
  <xsl:element name="table_attributes" use-attribute-sets="table-style">
2280
+
2281
+ <xsl:if test="$margin-side != 0">
2282
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2283
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2284
+ </xsl:if>
2285
+
2269
2286
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2270
2287
 
2271
- <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2272
- <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2288
+ <xsl:if test="$margin-side != 0">
2289
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2290
+ <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2291
+ </xsl:if>
2273
2292
 
2274
2293
  </xsl:element>
2275
2294
  </xsl:variable>
@@ -3025,6 +3044,10 @@
3025
3044
  <xsl:template match="*[local-name()='tr']">
3026
3045
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3027
3046
 
3047
+ <xsl:if test="*[local-name() = 'th']">
3048
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3049
+ </xsl:if>
3050
+
3028
3051
  <xsl:call-template name="setTableRowAttributes"/>
3029
3052
  <xsl:apply-templates/>
3030
3053
  </fo:table-row>
@@ -4992,6 +5015,9 @@
4992
5015
  <xsl:value-of select="substring($str, 2)"/>
4993
5016
  </xsl:template>
4994
5017
 
5018
+ <!-- ======================================= -->
5019
+ <!-- math -->
5020
+ <!-- ======================================= -->
4995
5021
  <xsl:template match="mathml:math">
4996
5022
  <xsl:variable name="isAdded" select="@added"/>
4997
5023
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -5042,14 +5068,57 @@
5042
5068
  <xsl:value-of select="$comment_text"/>
5043
5069
  </xsl:template>
5044
5070
 
5071
+ <xsl:template match="*[local-name() = 'asciimath']">
5072
+ <xsl:param name="process" select="'false'"/>
5073
+ <xsl:if test="$process = 'true'">
5074
+ <xsl:apply-templates/>
5075
+ </xsl:if>
5076
+ </xsl:template>
5077
+
5078
+ <xsl:template match="*[local-name() = 'latexmath']"/>
5079
+
5080
+ <xsl:template name="getMathml_asciimath_text">
5081
+ <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
5082
+ <xsl:variable name="latexmath">
5083
+
5084
+ </xsl:variable>
5085
+ <xsl:variable name="asciimath_text_following">
5086
+ <xsl:choose>
5087
+ <xsl:when test="normalize-space($latexmath) != ''">
5088
+ <xsl:value-of select="$latexmath"/>
5089
+ </xsl:when>
5090
+ <xsl:when test="normalize-space($asciimath) != ''">
5091
+ <xsl:value-of select="$asciimath"/>
5092
+ </xsl:when>
5093
+ <xsl:otherwise>
5094
+ <xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
5095
+ </xsl:otherwise>
5096
+ </xsl:choose>
5097
+ </xsl:variable>
5098
+ <xsl:variable name="asciimath_text_">
5099
+ <xsl:choose>
5100
+ <xsl:when test="normalize-space($asciimath_text_following) != ''">
5101
+ <xsl:value-of select="$asciimath_text_following"/>
5102
+ </xsl:when>
5103
+ <xsl:otherwise>
5104
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
5105
+ </xsl:otherwise>
5106
+ </xsl:choose>
5107
+ </xsl:variable>
5108
+ <xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
5109
+ <xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
5110
+ <xsl:value-of select="$asciimath_text"/>
5111
+ </xsl:template>
5112
+
5045
5113
  <xsl:template name="mathml_instream_object">
5046
- <xsl:param name="comment_text"/>
5114
+ <xsl:param name="asciimath_text"/>
5047
5115
  <xsl:param name="mathml_content"/>
5048
5116
 
5049
- <xsl:variable name="comment_text_">
5117
+ <xsl:variable name="asciimath_text_">
5050
5118
  <xsl:choose>
5051
- <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
5052
- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
5119
+ <xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
5120
+ <!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
5121
+ <xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
5053
5122
  </xsl:choose>
5054
5123
  </xsl:variable>
5055
5124
 
@@ -5066,10 +5135,10 @@
5066
5135
  </xsl:attribute>
5067
5136
 
5068
5137
  <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
5069
- <xsl:if test="normalize-space($comment_text_) != ''">
5138
+ <xsl:if test="normalize-space($asciimath_text_) != ''">
5070
5139
  <!-- put Mathin Alternate Text -->
5071
5140
  <xsl:attribute name="fox:alt-text">
5072
- <xsl:value-of select="$comment_text_"/>
5141
+ <xsl:value-of select="$asciimath_text_"/>
5073
5142
  </xsl:attribute>
5074
5143
  </xsl:if>
5075
5144
  <!-- </xsl:if> -->
@@ -5142,6 +5211,29 @@
5142
5211
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
5143
5212
  </xsl:template>
5144
5213
 
5214
+ <!-- Examples:
5215
+ <stem type="AsciiMath">x = 1</stem>
5216
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
5217
+ <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
5218
+ -->
5219
+ <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
5220
+ <fo:inline xsl:use-attribute-sets="mathml-style">
5221
+
5222
+ <xsl:choose>
5223
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
5224
+ <xsl:otherwise>
5225
+ <xsl:apply-templates>
5226
+ <xsl:with-param name="process">true</xsl:with-param>
5227
+ </xsl:apply-templates>
5228
+ </xsl:otherwise>
5229
+ </xsl:choose>
5230
+
5231
+ </fo:inline>
5232
+ </xsl:template>
5233
+ <!-- ======================================= -->
5234
+ <!-- END: math -->
5235
+ <!-- ======================================= -->
5236
+
5145
5237
  <xsl:template match="*[local-name()='localityStack']"/>
5146
5238
 
5147
5239
  <xsl:template match="*[local-name()='link']" name="link">
@@ -6484,9 +6576,9 @@
6484
6576
  <xsl:apply-templates mode="contents_item"/>
6485
6577
  </xsl:template>
6486
6578
 
6487
- <!-- ====== -->
6488
- <!-- sourcecode -->
6489
- <!-- ====== -->
6579
+ <!-- =============== -->
6580
+ <!-- sourcecode -->
6581
+ <!-- =============== -->
6490
6582
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
6491
6583
 
6492
6584
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
@@ -6783,8 +6875,22 @@
6783
6875
  </fo:block>
6784
6876
  </xsl:if>
6785
6877
  </xsl:template>
6786
- <!-- ====== -->
6787
- <!-- ====== -->
6878
+ <!-- =============== -->
6879
+ <!-- END sourcecode -->
6880
+ <!-- =============== -->
6881
+
6882
+ <!-- =============== -->
6883
+ <!-- pre -->
6884
+ <!-- =============== -->
6885
+ <xsl:template match="*[local-name()='pre']" name="pre">
6886
+ <fo:block xsl:use-attribute-sets="pre-style">
6887
+ <xsl:copy-of select="@id"/>
6888
+ <xsl:apply-templates/>
6889
+ </fo:block>
6890
+ </xsl:template>
6891
+ <!-- =============== -->
6892
+ <!-- pre -->
6893
+ <!-- =============== -->
6788
6894
 
6789
6895
  <!-- ========== -->
6790
6896
  <!-- permission -->
@@ -9339,13 +9445,14 @@
9339
9445
  </xsl:template>
9340
9446
 
9341
9447
  <xsl:template name="setId">
9448
+ <xsl:param name="prefix"/>
9342
9449
  <xsl:attribute name="id">
9343
9450
  <xsl:choose>
9344
9451
  <xsl:when test="@id">
9345
- <xsl:value-of select="@id"/>
9452
+ <xsl:value-of select="concat($prefix, @id)"/>
9346
9453
  </xsl:when>
9347
9454
  <xsl:otherwise>
9348
- <xsl:value-of select="generate-id()"/>
9455
+ <xsl:value-of select="concat($prefix, generate-id())"/>
9349
9456
  </xsl:otherwise>
9350
9457
  </xsl:choose>
9351
9458
  </xsl:attribute>
@@ -188,6 +188,11 @@
188
188
  <value>adapter</value>
189
189
  <value>translator</value>
190
190
  <value>distributor</value>
191
+ <value>realizer</value>
192
+ <value>owner</value>
193
+ <value>authorizer</value>
194
+ <value>enabler</value>
195
+ <value>subject</value>
191
196
  </choice>
192
197
  </attribute>
193
198
  <zeroOrMore>
@@ -177,11 +177,7 @@
177
177
  </optional>
178
178
  <optional>
179
179
  <attribute name="style">
180
- <choice>
181
- <value>basic</value>
182
- <value>full</value>
183
- <value>short</value>
184
- </choice>
180
+ <ref name="XrefStyleType"/>
185
181
  </attribute>
186
182
  </optional>
187
183
  <ref name="XrefBody"/>
@@ -1031,6 +1027,7 @@
1031
1027
  <ref name="stem"/>
1032
1028
  <ref name="index"/>
1033
1029
  <ref name="eref"/>
1030
+ <ref name="erefstack"/>
1034
1031
  <ref name="xref"/>
1035
1032
  <ref name="hyperlink"/>
1036
1033
  </choice>
@@ -1045,6 +1042,7 @@
1045
1042
  <ref name="stem"/>
1046
1043
  <ref name="index"/>
1047
1044
  <ref name="eref"/>
1045
+ <ref name="erefstack"/>
1048
1046
  <ref name="xref"/>
1049
1047
  <ref name="hyperlink"/>
1050
1048
  </choice>
@@ -1058,6 +1056,7 @@
1058
1056
  <ref name="PureTextElement"/>
1059
1057
  <ref name="index"/>
1060
1058
  <ref name="eref"/>
1059
+ <ref name="erefstack"/>
1061
1060
  <ref name="xref"/>
1062
1061
  <ref name="hyperlink"/>
1063
1062
  </choice>
@@ -1195,6 +1194,7 @@
1195
1194
  <ref name="add"/>
1196
1195
  <ref name="del"/>
1197
1196
  <ref name="span"/>
1197
+ <ref name="erefstack"/>
1198
1198
  </choice>
1199
1199
  </define>
1200
1200
  <define name="add">
@@ -1202,6 +1202,7 @@
1202
1202
  <choice>
1203
1203
  <ref name="PureTextElement"/>
1204
1204
  <ref name="eref"/>
1205
+ <ref name="erefstack"/>
1205
1206
  <ref name="stem"/>
1206
1207
  <ref name="keyword"/>
1207
1208
  <ref name="xref"/>
@@ -1214,6 +1215,7 @@
1214
1215
  <choice>
1215
1216
  <ref name="PureTextElement"/>
1216
1217
  <ref name="eref"/>
1218
+ <ref name="erefstack"/>
1217
1219
  <ref name="stem"/>
1218
1220
  <ref name="keyword"/>
1219
1221
  <ref name="xref"/>
@@ -1278,6 +1280,7 @@
1278
1280
  </optional>
1279
1281
  <choice>
1280
1282
  <ref name="eref"/>
1283
+ <ref name="erefstack"/>
1281
1284
  <ref name="xref"/>
1282
1285
  <ref name="termref"/>
1283
1286
  </choice>
@@ -1970,6 +1973,7 @@
1970
1973
  </element>
1971
1974
  <choice>
1972
1975
  <ref name="eref"/>
1976
+ <ref name="erefstack"/>
1973
1977
  <ref name="xref"/>
1974
1978
  <ref name="termref"/>
1975
1979
  </choice>
@@ -2525,6 +2529,7 @@
2525
2529
  <ref name="xref"/>
2526
2530
  <ref name="hyperlink"/>
2527
2531
  <ref name="eref"/>
2532
+ <ref name="erefstack"/>
2528
2533
  </choice>
2529
2534
  <oneOrMore>
2530
2535
  <element name="coords">
@@ -2572,6 +2577,7 @@
2572
2577
  <ref name="xref"/>
2573
2578
  <ref name="hyperlink"/>
2574
2579
  <ref name="eref"/>
2580
+ <ref name="erefstack"/>
2575
2581
  </choice>
2576
2582
  </element>
2577
2583
  </zeroOrMore>
@@ -2620,6 +2626,15 @@
2620
2626
  <ref name="PureTextElement"/>
2621
2627
  </oneOrMore>
2622
2628
  </define>
2629
+ <define name="XrefConnectiveType">
2630
+ <choice>
2631
+ <value>and</value>
2632
+ <value>or</value>
2633
+ <value>from</value>
2634
+ <value>to</value>
2635
+ <value/>
2636
+ </choice>
2637
+ </define>
2623
2638
  <define name="XrefTarget">
2624
2639
  <element name="location">
2625
2640
  <attribute name="target">
@@ -2628,16 +2643,35 @@
2628
2643
  </data>
2629
2644
  </attribute>
2630
2645
  <attribute name="connective">
2631
- <choice>
2632
- <value>and</value>
2633
- <value>or</value>
2634
- <value>from</value>
2635
- <value>to</value>
2636
- <value/>
2637
- </choice>
2646
+ <ref name="XrefConnectiveType"/>
2638
2647
  </attribute>
2639
2648
  </element>
2640
2649
  </define>
2650
+ <define name="XrefStyleType">
2651
+ <choice>
2652
+ <value>basic</value>
2653
+ <value>full</value>
2654
+ <value>short</value>
2655
+ <value>id</value>
2656
+ </choice>
2657
+ </define>
2658
+ <define name="erefTypeWithConnective">
2659
+ <optional>
2660
+ <attribute name="connective">
2661
+ <ref name="XrefConnectiveType"/>
2662
+ </attribute>
2663
+ </optional>
2664
+ <ref name="erefType"/>
2665
+ </define>
2666
+ <define name="erefstack">
2667
+ <element name="erefstack">
2668
+ <oneOrMore>
2669
+ <element name="eref">
2670
+ <ref name="erefTypeWithConnective"/>
2671
+ </element>
2672
+ </oneOrMore>
2673
+ </element>
2674
+ </define>
2641
2675
  <start>
2642
2676
  <ref name="standard-document"/>
2643
2677
  </start>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "2.1.11".freeze
3
+ VERSION = "2.1.12".freeze
4
4
  end
5
5
  end
@@ -21,12 +21,13 @@ Gem::Specification.new do |spec|
21
21
  spec.license = "BSD-2-Clause"
22
22
 
23
23
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
- f.match(%r{^(test|spec|features)/})
24
+ f.match(%r{^(test|spec|features|bin|.github)/}) \
25
+ || f.match(%r{Rakefile|bin/rspec})
25
26
  end
26
27
  spec.bindir = "exe"
27
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
29
  spec.require_paths = ["lib"]
29
- spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
30
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
30
31
 
31
32
  spec.add_dependency "htmlentities", "~> 4.3.4"
32
33
  spec.add_dependency "thread_safe"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3aawg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.11
4
+ version: 2.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-24 00:00:00.000000000 Z
11
+ date: 2022-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -204,9 +204,6 @@ executables: []
204
204
  extensions: []
205
205
  extra_rdoc_files: []
206
206
  files:
207
- - ".github/workflows/automerge.yml"
208
- - ".github/workflows/rake.yml"
209
- - ".github/workflows/release.yml"
210
207
  - ".gitignore"
211
208
  - ".hound.yml"
212
209
  - ".rubocop.yml"
@@ -214,10 +211,6 @@ files:
214
211
  - Gemfile
215
212
  - LICENSE
216
213
  - README.adoc
217
- - Rakefile
218
- - bin/console
219
- - bin/rspec
220
- - bin/setup
221
214
  - lib/isodoc/m3aawg/base_convert.rb
222
215
  - lib/isodoc/m3aawg/html/dots-w@2x.png
223
216
  - lib/isodoc/m3aawg/html/dots@2x.png
@@ -273,14 +266,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
273
266
  requirements:
274
267
  - - ">="
275
268
  - !ruby/object:Gem::Version
276
- version: 2.5.0
269
+ version: 2.7.0
277
270
  required_rubygems_version: !ruby/object:Gem::Requirement
278
271
  requirements:
279
272
  - - ">="
280
273
  - !ruby/object:Gem::Version
281
274
  version: '0'
282
275
  requirements: []
283
- rubygems_version: 3.1.6
276
+ rubygems_version: 3.3.7
284
277
  signing_key:
285
278
  specification_version: 4
286
279
  summary: metanorma-m3d lets you write M3AAWG Documents in AsciiDoc.
@@ -1,31 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- # source: https://github.com/marketplace/actions/merge-pull-requests#usage
4
- name: automerge
5
- on:
6
- pull_request:
7
- types:
8
- - labeled
9
- - unlabeled
10
- - synchronize
11
- - opened
12
- - edited
13
- - ready_for_review
14
- - reopened
15
- - unlocked
16
- pull_request_review:
17
- types:
18
- - submitted
19
- check_suite:
20
- types:
21
- - completed
22
- status: {}
23
- jobs:
24
- automerge:
25
- runs-on: ubuntu-latest
26
- steps:
27
- - id: automerge
28
- name: automerge
29
- uses: "pascalgn/automerge-action@v0.15.3"
30
- env:
31
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
@@ -1,15 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: rake
4
-
5
- on:
6
- push:
7
- branches: [ master, main ]
8
- tags: [ v* ]
9
- pull_request:
10
-
11
- jobs:
12
- notify:
13
- uses: metanorma/ci/.github/workflows/mn-processor-rake.yml@main
14
- secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -1,24 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: release
4
-
5
- on:
6
- workflow_dispatch:
7
- inputs:
8
- next_version:
9
- description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
- required: true
12
- default: 'skip'
13
- push:
14
- tags: [ v* ]
15
-
16
- jobs:
17
- release:
18
- uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
19
- with:
20
- next_version: ${{ github.event.inputs.next_version }}
21
- secrets:
22
- rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
23
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
24
-
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require 'isodoc/gem_tasks'
4
-
5
- IsoDoc::GemTasks.install
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "metanorma-m3aawg"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/rspec DELETED
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rspec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require "pathname"
10
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path(
11
- "../../Gemfile", Pathname.new(__FILE__).realpath
12
- )
13
-
14
- require "rubygems"
15
- require "bundler/setup"
16
-
17
- load Gem.bin_path("rspec-core", "rspec")
18
-
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here