Changeset c226182 for stylesheets


Ignore:
Timestamp:
08/03/2006 07:29:29 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
bfa508ae
Parents:
a15464d
Message:

Ported updates from 6.2 branch.
Small tags fixes.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7758 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
stylesheets/pdf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/pdf/lfs-mixed.xsl

    ra15464d rc226182  
    1717 <xsl:template match="para">
    1818    <xsl:choose>
     19      <xsl:when test="child::ulink[@url=' ']"/>
    1920      <xsl:when test="./@remap='verbatim'">
    2021        <fo:block wrap-option="no-wrap"
     
    255256  </xsl:template>
    256257
     258    <!-- Total packages size calculation -->
     259  <xsl:template match="returnvalue">
     260    <xsl:call-template name="calculation">
     261     <xsl:with-param name="scope" select="../../variablelist"/>
     262    </xsl:call-template>
     263  </xsl:template>
     264
     265  <xsl:template name="calculation">
     266    <xsl:param name="scope"/>
     267    <xsl:param name="total">0</xsl:param>
     268    <xsl:param name="position">1</xsl:param>
     269    <xsl:variable name="tokens" select="count($scope/varlistentry)"/>
     270    <xsl:variable name="token" select="$scope/varlistentry[$position]/term/token"/>
     271    <xsl:variable name="size" select="substring-before($token,' KB')"/>
     272    <xsl:variable name="rawsize">
     273      <xsl:choose>
     274        <xsl:when test="contains($size,',')">
     275          <xsl:value-of select="concat(substring-before($size,','),substring-after($size,','))"/>
     276        </xsl:when>
     277        <xsl:otherwise>
     278          <xsl:value-of select="$size"/>
     279        </xsl:otherwise>
     280      </xsl:choose>
     281    </xsl:variable>
     282    <xsl:choose>
     283      <xsl:when test="$position &lt;= $tokens">
     284        <xsl:call-template name="calculation">
     285          <xsl:with-param name="scope" select="$scope"/>
     286          <xsl:with-param name="position" select="$position +1"/>
     287          <xsl:with-param name="total" select="$total + $rawsize"/>
     288        </xsl:call-template>
     289      </xsl:when>
     290      <xsl:otherwise>
     291        <xsl:choose>
     292          <xsl:when test="$total &lt; '1000'">
     293            <xsl:value-of select="$total"/>
     294            <xsl:text>  KB</xsl:text>
     295          </xsl:when>
     296          <xsl:when test="$total &gt; '1000' and $total &lt; '5000'">
     297            <xsl:value-of select="substring($total,1,1)"/>
     298            <xsl:text>,</xsl:text>
     299            <xsl:value-of select="substring($total,2)"/>
     300            <xsl:text>  KB</xsl:text>
     301          </xsl:when>
     302          <xsl:otherwise>
     303            <xsl:value-of select="round($total div 1024)"/>
     304            <xsl:text>  MB</xsl:text>
     305          </xsl:otherwise>
     306        </xsl:choose>
     307      </xsl:otherwise>
     308    </xsl:choose>
     309  </xsl:template>
     310
    257311</xsl:stylesheet>
  • stylesheets/pdf/lfs-pagesetup.xsl

    ra15464d rc226182  
    110110  <xsl:param name="footer.rule" select="0"></xsl:param>
    111111  <xsl:param name="marker.section.level" select="-1"></xsl:param>
     112  <xsl:attribute-set name="compact.list.item.spacing">
     113    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
     114    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
     115    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
     116  </xsl:attribute-set>
    112117
    113118    <!-- Dropping a blank page -->
Note: See TracChangeset for help on using the changeset viewer.