瀏覽代碼

Added keep-together dbfo PI support to admonitions.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8140 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia 18 年之前
父節點
當前提交
073c9b91a5
共有 1 個文件被更改,包括 15 次插入1 次删除
  1. 15 1
      pdf/lfs-admon.xsl

+ 15 - 1
pdf/lfs-admon.xsl

@@ -14,7 +14,21 @@
 
     <!-- Global admonitions properties -->
   <xsl:attribute-set name="graphical.admonition.properties">
-    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
+    <xsl:attribute name="keep-together.within-column">
+      <xsl:variable name="keep.together">
+        <xsl:call-template name="dbfo-attribute">
+          <xsl:with-param name="pis"
+                          select="processing-instruction('dbfo')"/>
+          <xsl:with-param name="attribute" select="'keep-together'"/>
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:choose>
+        <xsl:when test="$keep.together != ''">
+          <xsl:value-of select="$keep.together"/>
+        </xsl:when>
+        <xsl:otherwise>always</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
     <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
     <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
     <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>