Changeset a112251 for stylesheets


Ignore:
Timestamp:
08/10/2004 08:59:00 PM (20 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
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, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 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:
6872957
Parents:
01d6d63
Message:

Print output: added graphics and background color to admonitions, shaded screen.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4025 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
stylesheets
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs-print.xsl

    r01d6d63 ra112251  
    1212  <xsl:include href="print/lfs-index.xsl"/>
    1313  <xsl:include href="print/lfs-pagesetup.xsl"/>
     14  <xsl:include href="print/lfs-sections.xsl"/>
     15  <xsl:include href="print/lfs-mixed.xsl"/>
    1416
    1517    <!-- Paper size required by the publisher -->
     
    3638  <xsl:param name="toc.indent.width" select="18"></xsl:param>
    3739
    38     <!-- Page number in Xref-->
     40    <!-- Page number in Xref ?-->
    3941  <xsl:param name="insert.xref.page.number">no</xsl:param>
    40   <xsl:template match="*" mode="page.citation">
    41     <xsl:param name="id" select="'???'"/>
    42     <fo:inline keep-together.within-line="always">
    43       <!--<xsl:text>[p</xsl:text>-->
    44       <fo:page-number-citation ref-id="{$id}"/>
    45       <!--<xsl:text>]</xsl:text>-->
    46     </fo:inline>
    47   </xsl:template>
    4842
    4943    <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
    5044  <xsl:param name="ulink.show" select="0"/>
    5145
    52     <!-- Sections numbering -->
    53   <xsl:param name="section.autolabel" select="1"/>
    54   <xsl:param name="section.label.includes.component.label" select="1"/>
    55 
    5646</xsl:stylesheet>
  • stylesheets/print/lfs-index.xsl

    r01d6d63 ra112251  
    123123  </xsl:template>
    124124
     125    <!-- Page number in Index-->
     126  <xsl:template match="*" mode="page.citation">
     127    <xsl:param name="id" select="'???'"/>
     128    <fo:inline keep-together.within-line="always">
     129      <!--<xsl:text>[p</xsl:text>-->
     130      <fo:page-number-citation ref-id="{$id}"/>
     131      <!--<xsl:text>]</xsl:text>-->
     132    </fo:inline>
     133  </xsl:template>
     134
    125135</xsl:stylesheet>
  • stylesheets/print/lfs-pagesetup.xsl

    r01d6d63 ra112251  
    44                xmlns:fo="http://www.w3.org/1999/XSL/Format"
    55                version="1.0">
    6 
    7     <!-- Force section1's onto a new page -->
    8   <xsl:attribute-set name="section.level1.properties">
    9     <xsl:attribute name="break-after">
    10       <xsl:choose>
    11         <xsl:when test="not(position()=last())">
    12           <xsl:text>page</xsl:text>
    13         </xsl:when>
    14         <xsl:otherwise>
    15           <xsl:text>auto</xsl:text>
    16         </xsl:otherwise>
    17       </xsl:choose>
    18     </xsl:attribute>
    19   </xsl:attribute-set>
    20 
    21     <!-- Skip numeraration for sections with empty title -->
    22   <xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
    23     <xsl:if test="string-length(title) > 0">
    24       <!-- label the parent -->
    25       <xsl:variable name="parent.label">
    26         <xsl:apply-templates select=".." mode="label.markup"/>
    27       </xsl:variable>
    28       <xsl:if test="$parent.label != ''">
    29         <xsl:apply-templates select=".." mode="label.markup"/>
    30       <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
    31       </xsl:if>
    32       <xsl:choose>
    33         <xsl:when test="@label">
    34           <xsl:value-of select="@label"/>
    35         </xsl:when>
    36         <xsl:when test="$section.autolabel != 0">
    37           <xsl:choose>
    38             <xsl:when test="local-name(.) = 'sect2'">
    39               <xsl:choose>
    40                 <!-- If the first sect2 isn't numbered, renumber the remainig sections -->
    41                 <xsl:when test="string-length(../sect2[1]/title) = 0">
    42                   <xsl:variable name="totalsect2">
    43                     <xsl:number count="sect2"/>
    44                   </xsl:variable>
    45                   <xsl:number value="$totalsect2 - 1"/>
    46                 </xsl:when>
    47                 <xsl:otherwise>
    48                   <xsl:number count="sect2"/>
    49                 </xsl:otherwise>
    50               </xsl:choose>
    51             </xsl:when>
    52             <xsl:when test="local-name(.) = 'sect3'">
    53               <xsl:number count="sect3"/>
    54             </xsl:when>
    55             <xsl:when test="local-name(.) = 'sect4'">
    56               <xsl:number count="sect4"/>
    57             </xsl:when>
    58             <xsl:when test="local-name(.) = 'sect5'">
    59               <xsl:number count="sect5"/>
    60             </xsl:when>
    61             <xsl:otherwise>
    62               <xsl:message>label.markup: this can't happen!</xsl:message>
    63             </xsl:otherwise>
    64           </xsl:choose>
    65         </xsl:when>
    66       </xsl:choose>
    67     </xsl:if>
    68   </xsl:template>
    69 
    70   <!-- Drop the trailing punctuation if title is empty -->
    71   <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
    72                       |bridgehead"
    73                 mode="object.title.template">
    74     <xsl:choose>
    75       <xsl:when test="$section.autolabel != 0">
    76         <xsl:if test="string-length(title) > 0">
    77           <xsl:call-template name="gentext.template">
    78             <xsl:with-param name="context" select="'title-numbered'"/>
    79             <xsl:with-param name="name">
    80               <xsl:call-template name="xpath.location"/>
    81             </xsl:with-param>
    82           </xsl:call-template>
    83         </xsl:if>
    84       </xsl:when>
    85       <xsl:otherwise>
    86         <xsl:call-template name="gentext.template">
    87           <xsl:with-param name="context" select="'title-unnumbered'"/>
    88           <xsl:with-param name="name">
    89             <xsl:call-template name="xpath.location"/>
    90           </xsl:with-param>
    91         </xsl:call-template>
    92       </xsl:otherwise>
    93     </xsl:choose>
    94   </xsl:template>
    956
    967    <!-- Header -->
     
    13950
    14051  <xsl:template name="part.titlepage">
    141     <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
     52    <fo:block>
    14253      <fo:block space-before="2.5in">
    14354        <xsl:call-template name="part.titlepage.before.recto"/>
     
    191102  <xsl:template name="book.titlepage.separator"/>
    192103
    193     <!-- How render a variablelist -->
    194   <xsl:param name="variablelist.as.blocks" select="1"/>
    195  
    196     <!-- Adding space before segmentedlist -->
    197   <xsl:template match="segmentedlist">
    198     <xsl:variable name="presentation">
    199       <xsl:call-template name="pi-attribute">
    200         <xsl:with-param name="pis"
    201                         select="processing-instruction('dbfo')"/>
    202         <xsl:with-param name="attribute" select="'list-presentation'"/>
    203       </xsl:call-template>
    204     </xsl:variable>
    205     <xsl:choose>
    206       <xsl:when test="$presentation = 'table'">
    207         <xsl:apply-templates select="." mode="seglist-table"/>
    208       </xsl:when>
    209       <xsl:when test="$presentation = 'list'">
    210         <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
    211                 space-before.maximum="0.8em">
    212           <xsl:apply-templates/>
    213         </fo:block>
    214       </xsl:when>
    215       <xsl:when test="$segmentedlist.as.table != 0">
    216         <xsl:apply-templates select="." mode="seglist-table"/>
    217       </xsl:when>
    218       <xsl:otherwise>
    219         <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
    220                 space-before.maximum="0.8em">
    221           <xsl:apply-templates/>
    222         </fo:block>
    223       </xsl:otherwise>
    224     </xsl:choose>
    225   </xsl:template>
    226 
    227104
    228105</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.