lib/isodoc/m3aawg/m3aawg.policy.xsl in metanorma-m3aawg-1.7.8 vs lib/isodoc/m3aawg/m3aawg.policy.xsl in metanorma-m3aawg-1.7.9
- old
+ new
@@ -37,11 +37,11 @@
<xsl:call-template name="getLang"/>
</xsl:variable>
<xsl:template match="/">
<xsl:call-template name="namespaceCheck"/>
- <fo:root font-family="Garamond" font-size="12pt" xml:lang="{$lang}">
+ <fo:root font-family="EB Garamond 12" font-size="12pt" xml:lang="{$lang}">
<fo:layout-master-set>
<!-- cover page -->
<fo:simple-page-master master-name="cover" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
<fo:region-body margin-top="31mm" margin-bottom="32mm" margin-left="17.3mm" margin-right="22mm"/>
@@ -1070,11 +1070,11 @@
- <xsl:attribute name="font-family">Courier</xsl:attribute>
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -1158,10 +1158,11 @@
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
@@ -1386,11 +1387,11 @@
</xsl:attribute-set><xsl:attribute-set name="tt-style">
- <xsl:attribute name="font-family">Courier</xsl:attribute>
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
<xsl:attribute name="font-size">11pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -1619,10 +1620,12 @@
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
<xsl:if test="$isNoteOrFnExist = 'true'">
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
</xsl:if>
+
+
<xsl:choose>
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
<fo:table-column column-width="{@width}"/>
</xsl:for-each>
@@ -1906,14 +1909,14 @@
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
<xsl:with-param name="continued">true</xsl:with-param>
</xsl:apply-templates>
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
- <xsl:call-template name="fn_name_display"/>
- </xsl:for-each>
+
+
+
</fo:table-cell>
</fo:table-row>
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
<fo:table-body>
<xsl:apply-templates/>
@@ -1990,12 +1993,16 @@
<xsl:param name="colwidths"/>
<xsl:param name="colgroup"/>
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
- <xsl:if test="$isNoteOrFnExist = 'true'">
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
+
+ </xsl:variable>
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
+
<xsl:variable name="cols-count">
<xsl:choose>
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
</xsl:when>
@@ -2131,10 +2138,23 @@
<xsl:apply-templates/>
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
</fo:table-body>
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
+ <xsl:choose>
+ <xsl:when test="substring-after(., '—') != ''">
+ <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
+ <xsl:apply-templates mode="presentation_name"/>
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
+ <xsl:apply-templates select="."/>
</xsl:template><xsl:template match="*[local-name()='tr']">
<xsl:variable name="parent-name" select="local-name(..)"/>
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
<fo:table-row min-height="4mm">
<xsl:if test="$parent-name = 'thead'">
@@ -2303,18 +2323,16 @@
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
<xsl:apply-templates/>
</xsl:template><xsl:template name="fn_display">
<xsl:variable name="references">
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
-
-
- <xsl:apply-templates/>
- </fn>
+ <xsl:call-template name="create_fn"/>
</xsl:for-each>
</xsl:variable>
+
<xsl:for-each select="xalan:nodeset($references)//fn">
<xsl:variable name="reference" select="@reference"/>
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
<fo:block margin-bottom="12pt">
@@ -2346,10 +2364,16 @@
<xsl:copy-of select="./node()"/>
</fo:inline>
</fo:block>
</xsl:if>
</xsl:for-each>
+ </xsl:template><xsl:template name="create_fn">
+ <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
+
+
+ <xsl:apply-templates/>
+ </fn>
</xsl:template><xsl:template name="fn_name_display">
<!-- <xsl:variable name="references">
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
<xsl:apply-templates />
@@ -3349,23 +3373,10 @@
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
<xsl:copy>
<!-- replace start and end spaces to non-break space -->
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
</xsl:copy>
- </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
- </xsl:copy>
- <xsl:choose>
- <!-- if in msub, then don't add space -->
- <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
- <!-- if next char in digit, don't add space -->
- <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
- <xsl:otherwise>
- <mathml:mspace width="0.5ex"/>
- </xsl:otherwise>
- </xsl:choose>
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
<xsl:variable name="target">
<xsl:choose>
<xsl:when test="@updatetype = 'true'">
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
@@ -4547,11 +4558,23 @@
<fo:inline xsl:use-attribute-sets="termexample-name-style">
<xsl:apply-templates/>
</fo:inline>
</xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
- <fo:inline><xsl:apply-templates/></fo:inline>
+ <xsl:variable name="element">inline
+
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="contains($element, 'block')">
+ <fo:block xsl:use-attribute-sets="example-p-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:inline><xsl:apply-templates/></fo:inline>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template><xsl:template match="*[local-name() = 'example']">
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -5120,10 +5143,9 @@
<fo:block><xsl:apply-templates/></fo:block>
</fo:table-cell>
</xsl:template><xsl:template name="processBibitem">
- <!-- end BIPM bibitem processing-->
\ No newline at end of file