Quellcode durchsuchen

Mixed stylesheets updates.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/new-xsl@8016 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia vor 18 Jahren
Ursprung
Commit
b01f3aa606
5 geänderte Dateien mit 47 neuen und 70 gelöschten Zeilen
  1. 6 5
      lfs-pdf.xsl
  2. 24 8
      pdf/lfs-index.xsl
  3. 7 52
      pdf/lfs-mixed.xsl
  4. 4 2
      pdf/lfs-pagesetup.xsl
  5. 6 3
      xhtml/lfs-index.xsl

+ 6 - 5
lfs-pdf.xsl

@@ -69,14 +69,15 @@
   <xsl:param name="insert.xref.page.number">no</xsl:param>
 
     <!-- Display URLs after ulinks? 1 = yes, 0 = no
-         Set to 0 tp prevent duplicate e-mails in the Acknowledgments pages -->
+         Set to 0 to prevent duplicate e-mails in the Acknowledgments pages -->
   <xsl:param name="ulink.show" select="0"/>
 
     <!-- Processing instruction for hard page breaks.
-         FOP-0.93 supports now @keep-together.* attributes, that solves
-         some page break issues. It also supports the soft page breack
-         procesing instruction included in the DocBook stylesheets.
-         But some times we may need hard page breaks. -->
+         FOP-0.93 supports now @keep-*.*, @orphans, and @widows attributes,
+         that solves several page break issues.
+         It also supports the soft page break procesing instruction included
+         in the DocBook stylesheets.
+         But some times we may need hard page breaks for final book versions. -->
     <!-- To know how to use all that page break features, see
          http://www.sagehill.net/docbookxsl/PageBreaking.html -->
   <xsl:template match="processing-instruction('hard-pagebreak')">

+ 24 - 8
pdf/lfs-index.xsl

@@ -29,21 +29,37 @@
   <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>
-    <xsl:attribute name="font-family"><xsl:value-of select="$title.fontset"/></xsl:attribute>
+    <xsl:attribute name="font-family">
+      <xsl:value-of select="$title.fontset"/>
+    </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">
+      <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="start-indent">0pt</xsl:attribute>
   </xsl:attribute-set>
 
     <!-- The Index title.
            This template is not actually needed but placed here
-           to allow to change the title, if wanted. -->
+           to allow to change the title, if wanted.
+           Note: To change the title involves creating the appropiate
+           entries in lfs-l10n.xml -->
     <!-- The original template is in {docbook-xsl}/common/titles.xsl -->
   <xsl:template match="index" mode="title.markup">
     <xsl:param name="allow-anchors" select="0"/>

+ 7 - 52
pdf/lfs-mixed.xsl

@@ -91,60 +91,15 @@
     </fo:inline>
   </xsl:template>
 
-    <!-- Show URLs in italic font -->
-  <xsl:template match="ulink" name="ulink">
-    <fo:inline font-style="italic">
-      <fo:basic-link xsl:use-attribute-sets="xref.properties">
-        <xsl:attribute name="external-destination">
-          <xsl:call-template name="fo-external-image">
-            <xsl:with-param name="filename" select="@url"/>
-          </xsl:call-template>
-        </xsl:attribute>
-        <xsl:choose>
-          <xsl:when test="count(child::node())=0">
-            <xsl:call-template name="hyphenate-url">
-              <xsl:with-param name="url" select="@url"/>
-            </xsl:call-template>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </fo:basic-link>
-    </fo:inline>
-    <xsl:if test="count(child::node()) != 0
-                  and string(.) != @url
-                  and $ulink.show != 0">
-      <!-- yes, show the URI -->
+    <!-- Show external URLs in italic font -->
+  <xsl:attribute-set name="xref.properties">
+    <xsl:attribute name="font-style">
       <xsl:choose>
-        <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
-          <xsl:text>&#xA0;</xsl:text>
-          <fo:footnote>
-            <xsl:call-template name="ulink.footnote.number"/>
-            <fo:footnote-body font-family="{$body.fontset}"
-                              font-size="{$footnote.font.size}">
-              <fo:block>
-                <xsl:call-template name="ulink.footnote.number"/>
-                <xsl:text> </xsl:text>
-                <fo:inline>
-                  <xsl:value-of select="@url"/>
-                </fo:inline>
-              </fo:block>
-            </fo:footnote-body>
-          </fo:footnote>
-        </xsl:when>
-        <xsl:otherwise>
-          <fo:inline hyphenate="false">
-            <xsl:text> [</xsl:text>
-            <xsl:call-template name="hyphenate-url">
-              <xsl:with-param name="url" select="@url"/>
-            </xsl:call-template>
-            <xsl:text>]</xsl:text>
-          </fo:inline>
-        </xsl:otherwise>
+        <xsl:when test="self::ulink">italic</xsl:when>
+        <xsl:otherwise>inherit</xsl:otherwise>
       </xsl:choose>
-    </xsl:if>
-  </xsl:template>
+    </xsl:attribute>
+  </xsl:attribute-set>
 
     <!-- How is rendered by default a variablelist -->
   <xsl:param name="variablelist.as.blocks" select="1"/>

+ 4 - 2
pdf/lfs-pagesetup.xsl

@@ -74,8 +74,10 @@
   </xsl:template>
 
     <!-- Margins -->
-  <xsl:param name="page.margin.inner">0.5in</xsl:param>
-  <xsl:param name="page.margin.outer">0.375in</xsl:param>
+  <xsl:param name="page.margin.inner" select="'0.5in'"/>
+  <xsl:param name="page.margin.outer" select="'0.375in'"/>
+  <xsl:param name="page.margin.bottom" select="'0.375in'"/>
+  <xsl:param name="page.margin.top" select="'0.375in'"/>
   <xsl:param name="body.start.indent" select="'0.7pc'"/>
   <xsl:param name="title.margin.left">-0.7pc</xsl:param>
   <xsl:attribute-set name="list.block.spacing">

+ 6 - 3
xhtml/lfs-index.xsl

@@ -35,9 +35,12 @@
     <xsl:text>longindex.html</xsl:text>
   </xsl:template>
 
-    <!--The Index title. We create this param to can have gettext support in
-        both the Index page title and links that point to the Index page.
-        It also allow us to change the title, if wanted.-->
+    <!-- The Index title:
+           We create this param to can have gettext support in both
+           the Index page title and links that point to the Index page.
+           It also allow us to change the title, if wanted.
+           Note: To change the title involves creating the appropiate
+           entries in lfs-l10n.xml-->
   <xsl:param name="index-title">Index</xsl:param>
 
     <!-- The Index title in links that points to it. -->