Changeset 3301


Ignore:
Timestamp:
May 8, 2007, 8:57:48 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

Added option to stop the chunking of each sect1 in chapters and to chunk each sect2 inside sect1.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/developerdoc/write_docbook_doc.xml

    r3286 r3301  
    242242      </sect3>
    243243    </sect2>
     244   
     245    <sect2 id="write_docbook_doc.begin.chunking">
     246      <title>Controlling chunking</title>
     247      <para>
     248        We have configured docbook to create a new output file for
     249        each new <sgmltag class="starttag">chapter</sgmltag>
     250        and <sgmltag class="starttag">sect1</sgmltag>. In most cases this
     251        gives each page a relatively good size. Not too long and not too short.
     252        However, if a chapter contains many small <sgmltag class="starttag">sect1</sgmltag>
     253        sections (for example, <xref linkend="resources"/>), you end up with many
     254        pages with just a few lines of text on each page. This is not so
     255        good and can be avoided by adding a <sgmltag class="attribute">chunked = "0"</sgmltag>
     256        attribute to the chapter, for example:
     257      </para>
     258      <programlisting>
     259&lt;chapter id="resources" chunked="0"&gt;
     260</programlisting>
     261      <para>
     262        This will stop the chunking of <sgmltag class="starttag">sect1</sgmltag>
     263        sections in this chapter. On the other
     264        hand, if you have a <sgmltag class="starttag">sect1</sgmltag>
     265        that contains many long <sgmltag class="starttag">sect2</sgmltag>
     266        sections you might want to put each <sgmltag class="starttag">sect2</sgmltag>
     267        section in a separate chunk. If you want to do this:
     268      </para>
     269      <programlisting>
     270&lt;sect1 id="sect.with.large.sect2" chunked="1"&gt;
     271</programlisting>
     272   
     273    </sect2>
     274   
    244275    <sect2 id="write_docbook_doc.begin.id">
    245276      <title>
  • trunk/doc/src/docbook/overviewdoc/resources.xml

    r3293 r3301  
    2727-->
    2828
    29 <chapter id="resources">
     29<chapter id="resources" chunked="0">
    3030  <?dbhtml dir="resources"?>
    3131  <title>Resources</title>
  • trunk/lib/docbook/custom-styles/docbook/plain/xsl/customized.chunked.xsl

    r3285 r3301  
    1616<xsl:param name="section.autolabel.max.depth" select="2" />
    1717<xsl:param name="chunk.first.sections" select="1" />
     18<xsl:param name="chunk.section.depth" select="2" />
     19<xsl:param name="chunk.fast" select="1" />
    1820<xsl:param name="toc.max.depth" select="4"/>
     21<xsl:param name="toc.section.depth" select="3" />
     22<xsl:param name="generate.section.toc.level" select="1" />
    1923<xsl:param name="generate.toc">
    2024appendix  toc,title
  • trunk/lib/docbook/docbook/xsl/html/chunk-common.xsl

    r3283 r3301  
    6161
    6262  <xsl:choose>
     63    <xsl:when test="../@chunked = 0">0</xsl:when>
    6364    <xsl:when test="not($node/parent::*)">1</xsl:when>
    6465
  • trunk/lib/docbook/preprocess/dweiss-docbook-extensions.dtd

    r3284 r3301  
    4545<!ATTLIST pasteFigure id    CDATA #IMPLIED >
    4646<!ATTLIST pasteFigure width CDATA #IMPLIED >
     47
     48<!-- allow some chapters to be non-chunked -->
     49<!ATTLIST chapter chunked (0|1) "1">
     50
     51<!-- allow some sect2 to be chunked -->
     52<!ATTLIST sect1 chunked (0|1) "0" >
Note: See TracChangeset for help on using the changeset viewer.