소스 검색

Fixes for PDF Index look.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8103 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia 18 년 전
부모
커밋
d70b161a78
2개의 변경된 파일40개의 추가작업 그리고 19개의 파일을 삭제
  1. 12 19
      pdf/lfs-index.xsl
  2. 28 0
      pdf/lfs-pagesetup.xsl

+ 12 - 19
pdf/lfs-index.xsl

@@ -17,7 +17,7 @@
          of page references. -->
   <xsl:param name="index.term.separator" select="': '"></xsl:param>
 
-  <!-- Divisions title properties. -->
+    <!-- Divisions title properties. -->
   <xsl:attribute-set name="index.div.title.properties">
     <xsl:attribute name="margin-left">0pt</xsl:attribute>
     <xsl:attribute name="font-size">14.4pt</xsl:attribute>
@@ -26,27 +26,20 @@
     </xsl:attribute>
     <xsl:attribute name="font-weight">bold</xsl:attribute>
     <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
-    <xsl:attribute name="space-before.optimum">
-      <xsl:value-of select="concat($body.font.master,'pt')"/>
-    </xsl:attribute>
-    <xsl:attribute name="space-before.minimum">
-      <xsl:value-of select="concat($body.font.master,'pt * 0.8')"/>
-    </xsl:attribute>
-    <xsl:attribute name="space-before.optimum">
-      <xsl:value-of select="concat($body.font.master,'pt * 1.2')"/>
-    </xsl:attribute>
-    <xsl:attribute name="space-after.optimum">
-      <xsl:value-of select="concat($body.font.master,'pt')"/>
-    </xsl:attribute>
-    <xsl:attribute name="space-after.minimum">
-      <xsl:value-of select="concat($body.font.master,'pt * 0.8')"/>
-    </xsl:attribute>
-    <xsl:attribute name="space-after.optimum">
-      <xsl:value-of select="concat($body.font.master,'pt * 1.2')"/>
-    </xsl:attribute>
+    <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.3em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.7em</xsl:attribute>
     <xsl:attribute name="start-indent">0pt</xsl:attribute>
   </xsl:attribute-set>
 
+    <!-- Properties applied to the block containing entries in an Index. -->
+  <xsl:attribute-set name="index.entry.properties">
+    <xsl:attribute name="start-indent">0.5pc</xsl:attribute>
+  </xsl:attribute-set>
+
     <!-- Divisions:
           Translate alphabetical divisons titles to by-type titles. -->
     <!-- The original template is in {docbook-xsl}/fo/autoidx.xsl -->

+ 28 - 0
pdf/lfs-pagesetup.xsl

@@ -37,6 +37,34 @@
     <!-- Adjust the left margin for titles. -->
   <xsl:param name="title.margin.left">-0.8pc</xsl:param>
 
+    <!-- Properties for component titles -->
+  <xsl:attribute-set name="component.title.properties">
+    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+    <xsl:attribute name="space-before.optimum">
+      <xsl:value-of select="concat($body.font.master, 'pt')"/>
+    </xsl:attribute>
+    <xsl:attribute name="space-before.minimum">
+      <xsl:value-of select="concat($body.font.master, 'pt * 0.8')"/>
+    </xsl:attribute>
+    <xsl:attribute name="space-before.maximum">
+      <xsl:value-of select="concat($body.font.master, 'pt * 1.2')"/>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenate">false</xsl:attribute>
+    <xsl:attribute name="text-align">
+      <xsl:choose>
+        <xsl:when test="((parent::article | parent::articleinfo |
+                          parent::info/parent::article)
+                          and not(ancestor::book) and not(self::bibliography))
+                        or (parent::slides | parent::slidesinfo)
+                        or self::index">center</xsl:when>
+        <xsl:otherwise>left</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+    <xsl:attribute name="start-indent">
+      <xsl:value-of select="$title.margin.left"/>
+    </xsl:attribute>
+  </xsl:attribute-set>
+
     <!-- Rule under headers? 1 =yes, 0 = no -->
   <xsl:param name="header.rule" select="0"/>