- Timestamp:
- 10/08/2013 08:03:29 PM (11 years ago)
- 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, 7.5, 7.6, 7.7, 7.8, 7.9, 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:
- 58675ce
- Parents:
- 09a35dd
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/lfs-xsl/docbook-xsl-1.78.1/fo/verbatim.xsl
r09a35dd r15c7d39 10 10 11 11 <!-- ******************************************************************** 12 $Id $12 $Id: verbatim.xsl 9590 2012-09-02 20:53:23Z tom_schr $ 13 13 ******************************************************************** 14 14 … … 19 19 ******************************************************************** --> 20 20 21 <xsl:include href="../highlighting/common.xsl"/> 22 <xsl:include href="highlight.xsl"/> 21 <!-- XSLTHL highlighting is turned off by default. See highlighting/README 22 for instructions on how to turn on XSLTHL --> 23 <xsl:template name="apply-highlighting"> 24 <xsl:apply-templates/> 25 </xsl:template> 23 26 24 27 <lxslt:component prefix="xverb" … … 37 40 <xsl:call-template name="number.rtf.lines"> 38 41 <xsl:with-param name="rtf"> 39 <xsl:call-template name="apply-highlighting"/> 42 <xsl:choose> 43 <xsl:when test="$highlight.source != 0"> 44 <xsl:call-template name="apply-highlighting"/> 45 </xsl:when> 46 <xsl:otherwise> 47 <xsl:apply-templates/> 48 </xsl:otherwise> 49 </xsl:choose> 40 50 </xsl:with-param> 41 51 </xsl:call-template> 42 52 </xsl:when> 43 53 <xsl:otherwise> 44 <xsl:call-template name="apply-highlighting"/>45 </xsl:otherwise>46 </xsl:choose>47 </xsl:variable>48 49 <xsl:choose>50 <xsl:when test="$shade.verbatim != 0">51 <fo:block id="{$id}"52 xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">53 54 <xsl:choose> 54 <xsl:when test="$h yphenate.verbatim != 0 and function-available('exsl:node-set')">55 <xsl: apply-templates select="exsl:node-set($content)" mode="hyphenate.verbatim"/>55 <xsl:when test="$highlight.source != 0"> 56 <xsl:call-template name="apply-highlighting"/> 56 57 </xsl:when> 57 58 <xsl:otherwise> 58 <xsl: copy-of select="$content"/>59 <xsl:apply-templates/> 59 60 </xsl:otherwise> 60 61 </xsl:choose> 61 </fo:block> 62 </xsl:when> 63 <xsl:otherwise> 64 <fo:block id="{$id}" 65 xsl:use-attribute-sets="monospace.verbatim.properties"> 66 <xsl:choose> 67 <xsl:when test="$hyphenate.verbatim != 0 and function-available('exsl:node-set')"> 68 <xsl:apply-templates select="exsl:node-set($content)" mode="hyphenate.verbatim"/> 69 </xsl:when> 70 <xsl:otherwise> 71 <xsl:copy-of select="$content"/> 72 </xsl:otherwise> 73 </xsl:choose> 74 </fo:block> 75 </xsl:otherwise> 76 </xsl:choose> 62 </xsl:otherwise> 63 </xsl:choose> 64 </xsl:variable> 65 66 <xsl:variable name="keep.together"> 67 <xsl:call-template name="pi.dbfo_keep-together"/> 68 </xsl:variable> 69 70 <xsl:variable name="block.content"> 71 <xsl:choose> 72 <xsl:when test="$shade.verbatim != 0"> 73 <fo:block id="{$id}" 74 xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> 75 <xsl:if test="$keep.together != ''"> 76 <xsl:attribute name="keep-together.within-column"><xsl:value-of 77 select="$keep.together"/></xsl:attribute> 78 </xsl:if> 79 <xsl:choose> 80 <xsl:when test="$hyphenate.verbatim != 0 and 81 $exsl.node.set.available != 0"> 82 <xsl:apply-templates select="exsl:node-set($content)" 83 mode="hyphenate.verbatim"/> 84 </xsl:when> 85 <xsl:otherwise> 86 <xsl:copy-of select="$content"/> 87 </xsl:otherwise> 88 </xsl:choose> 89 </fo:block> 90 </xsl:when> 91 <xsl:otherwise> 92 <fo:block id="{$id}" 93 xsl:use-attribute-sets="monospace.verbatim.properties"> 94 <xsl:if test="$keep.together != ''"> 95 <xsl:attribute name="keep-together.within-column"><xsl:value-of 96 select="$keep.together"/></xsl:attribute> 97 </xsl:if> 98 <xsl:choose> 99 <xsl:when test="$hyphenate.verbatim != 0 and 100 $exsl.node.set.available != 0"> 101 <xsl:apply-templates select="exsl:node-set($content)" 102 mode="hyphenate.verbatim"/> 103 </xsl:when> 104 <xsl:otherwise> 105 <xsl:copy-of select="$content"/> 106 </xsl:otherwise> 107 </xsl:choose> 108 </fo:block> 109 </xsl:otherwise> 110 </xsl:choose> 111 </xsl:variable> 112 113 <xsl:choose> 114 <!-- Need a block-container for these features --> 115 <xsl:when test="@width != '' or 116 (self::programlisting and 117 starts-with($writing.mode, 'rl'))"> 118 <fo:block-container start-indent="0pt" end-indent="0pt"> 119 <xsl:if test="@width != ''"> 120 <xsl:attribute name="width"> 121 <xsl:value-of select="concat(@width, '*', $monospace.verbatim.font.width)"/> 122 </xsl:attribute> 123 </xsl:if> 124 <!-- All known program code is left-to-right --> 125 <xsl:if test="self::programlisting and 126 starts-with($writing.mode, 'rl')"> 127 <xsl:attribute name="writing-mode">lr-tb</xsl:attribute> 128 </xsl:if> 129 <xsl:copy-of select="$block.content"/> 130 </fo:block-container> 131 </xsl:when> 132 <xsl:otherwise> 133 <xsl:copy-of select="$block.content"/> 134 </xsl:otherwise> 135 </xsl:choose> 136 77 137 </xsl:template> 78 138 … … 81 141 82 142 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> 143 144 <xsl:variable name="keep.together"> 145 <xsl:call-template name="pi.dbfo_keep-together"/> 146 </xsl:variable> 83 147 84 148 <xsl:variable name="content"> … … 106 170 <fo:block id="{$id}" 107 171 xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> 108 172 <xsl:if test="$keep.together != ''"> 173 <xsl:attribute name="keep-together.within-column"><xsl:value-of 174 select="$keep.together"/></xsl:attribute> 175 </xsl:if> 109 176 <xsl:copy-of select="$content"/> 110 177 </fo:block> … … 113 180 <fo:block id="{$id}" 114 181 xsl:use-attribute-sets="monospace.verbatim.properties"> 182 <xsl:if test="$keep.together != ''"> 183 <xsl:attribute name="keep-together.within-column"><xsl:value-of 184 select="$keep.together"/></xsl:attribute> 185 </xsl:if> 115 186 <xsl:copy-of select="$content"/> 116 187 </fo:block> … … 123 194 <fo:block id="{$id}" 124 195 xsl:use-attribute-sets="verbatim.properties shade.verbatim.style"> 196 <xsl:if test="$keep.together != ''"> 197 <xsl:attribute name="keep-together.within-column"><xsl:value-of 198 select="$keep.together"/></xsl:attribute> 199 </xsl:if> 125 200 <xsl:copy-of select="$content"/> 126 201 </fo:block> … … 129 204 <fo:block id="{$id}" 130 205 xsl:use-attribute-sets="verbatim.properties"> 206 <xsl:if test="$keep.together != ''"> 207 <xsl:attribute name="keep-together.within-column"><xsl:value-of 208 select="$keep.together"/></xsl:attribute> 209 </xsl:if> 131 210 <xsl:copy-of select="$content"/> 132 211 </fo:block> … … 320 399 <xsl:when test="$listings[1]/@continuation='continues'"> 321 400 <xsl:call-template name="lastLineNumber"> 322 <xsl:with-param name="listings" select=" listings[position() > 1]"/>401 <xsl:with-param name="listings" select="$listings[position() > 1]"/> 323 402 <xsl:with-param name="number" select="$number + $lines"/> 324 403 </xsl:call-template>
Note:
See TracChangeset
for help on using the changeset viewer.