Closed ronaldtse closed 6 months ago
I can replicate this in the PDF, and we have had similar issues in the past, but I don't understand the issue in this instance. The Presentation XML is:
<bibitem id="ISO-IEC_JTC-1_metaverse" type="webresource">
<formattedref><smallcap>ISO/IEC JTC 1</smallcap>.
<em><span class="stddocTitle">JTC 1 Standards and Standardization for the Metaverse</span></em>
[website]. 2023. Available from:
<span class="biburl"><link target="https://jtc1info.org/jtc-1-standards-and-standardization-for-the-metaverse/">https://jtc1info.org/jtc-1-standards-and-standardization-for-the-metaverse/</link></span>.
</formattedref>
<uri>https://jtc1info.org/jtc-1-standards-and-standardization-for-the-metaverse/</uri>
<docidentifier type="metanorma-ordinal">[1]</docidentifier>
<biblio-tag>[1]<tab/></biblio-tag>
</bibitem>
This issue has come up with the use of span
before in ISO, because of some processing PDF has inserted to ignore spaces, but I'm finding it hard to see why it is being triggered by formattedref/smallcap. @Intelligent2013 help me out, surely I shouldn't have to replace space with nsbp for any spaces in a formatting element within formattedref...
Presentation XML:
<smallcap>ISO/IEC JTC 1</smallcap>
XML Preprocessing step (via XSLT) encloses the standard title into tags <keep-together_within-line>
:
<smallcap><keep-together_within-line>ISO/IEC</keep-together_within-line> <keep-together_within-line>JTC 1</keep-together_within-line></smallcap>
to prevent splitting the string across lines.
The space is missing in the XSL-FO:
<fo:inline role="SKIP" keep-together.within-line="always"><fo:inline role="SKIP" font-size="75%"><fo:inline role="SKIP" font-size="133.33333333333334%">ISO/IEC</fo:inline></fo:inline></fo:inline><fo:inline role="SKIP" font-size="75%"/><fo:inline role="SKIP" keep-together.within-line="always"><fo:inline role="SKIP" font-size="75%"><fo:inline role="SKIP" font-size="133.33333333333334%">JTC 1</fo:inline></fo:inline></fo:inline>
This looks weird:
<fo:inline role="SKIP" font-size="75%"/>
When smallcap
processing is turned off, then there is the space:
<fo:inline role="SKIP" keep-together.within-line="always">ISO/IEC</fo:inline> <fo:inline role="SKIP" keep-together.within-line="always">JTC 1</fo:inline>
When 'keep-together_within-line' is turned off, then also there is the space:
<fo:inline role="SKIP" font-size="75%">
<fo:inline role="SKIP" font-size="133.33333333333334%">ISO/IEC JTC 1</fo:inline>
</fo:inline>
I'll investigate:
I don't figure out why I've normalized the text...
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
<xsl:variable name="text" select="normalize-space(.)"/>
Fixed: