Procházet zdrojové kódy

Added templates for better simplelist look.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8100 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia před 18 roky
rodič
revize
30b45e9a04
4 změnil soubory, kde provedl 53 přidání a 8 odebrání
  1. 0 4
      lfs-nochunks.xsl
  2. 0 4
      lfs.css
  3. 32 0
      pdf/lfs-mixed.xsl
  4. 21 0
      xhtml/lfs-mixed.xsl

+ 0 - 4
lfs-nochunks.xsl

@@ -566,10 +566,6 @@ p.usernotes {
   font-style: italic;
 }
 
-.simplelist {
-  background-color: #f0fff0;
-}
-
 .underlined {
   text-decoration: underline;
 }

+ 0 - 4
lfs.css

@@ -530,10 +530,6 @@ p.usernotes {
   font-style: italic;
 }
 
-.simplelist {
-  background-color: #f0fff0;
-}
-
 .underlined {
   text-decoration: underline;
 }

+ 32 - 0
pdf/lfs-mixed.xsl

@@ -332,4 +332,36 @@
     </fo:list-item>
   </xsl:template>
 
+    <!-- simplelist:
+           Self-made template. Wrap it into a fo:block and process member childs.
+           If @type is specified, the original templates will be used.
+           NOTE: when using type='horiz' or type='vert', FOP-0.93 will complaints
+             about not supported table-layout="auto" -->
+  <xsl:template match="simplelist">
+    <fo:block xsl:use-attribute-sets="simplelist.properties">
+      <xsl:apply-templates mode="condensed"/>
+    </fo:block>
+  </xsl:template>
+
+    <!-- member:
+           Self-made template to wrap it into a fo:block using customized
+           properties. -->
+  <xsl:template match="member" mode="condensed">
+    <fo:block xsl:use-attribute-sets="simplelist.properties">
+      <xsl:call-template name="simple.xlink">
+        <xsl:with-param name="content">
+          <xsl:apply-templates/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </fo:block>
+  </xsl:template>
+
+    <!-- Properties associated with our simplelist format. -->
+  <xsl:attribute-set name="simplelist.properties">
+    <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
+    <xsl:attribute name="space-before.optimum">0em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute>
+  </xsl:attribute-set>
+
 </xsl:stylesheet>

+ 21 - 0
xhtml/lfs-mixed.xsl

@@ -125,6 +125,27 @@
     </xsl:choose>
   </xsl:template>
 
+    <!-- para/simplelist:
+           Self-made template. Add a line break and process the childs.
+           If @type is specified, the original templates should be used,
+           but not tested. -->
+  <xsl:template match="para/simplelist">
+    <br/>
+    <xsl:apply-templates mode="condensed"/>
+  </xsl:template>
+
+    <!-- member:
+           Self-made template to process it and add a line break. -->
+  <xsl:template match="member" mode="condensed">
+    <xsl:call-template name="anchor"/>
+    <xsl:call-template name="simple.xlink">
+      <xsl:with-param name="content">
+        <xsl:apply-templates/>
+      </xsl:with-param>
+    </xsl:call-template>
+    <br/>
+  </xsl:template>
+
 
   <!-- Named formating templates -->