section|simplesect

- SourceForge
- Home Page
- Samples

- Reference Contents |
- Download & Install |
- User Guides |
- Notes, E-mail & Bugs |
- Q&A

Suggestions
Search:
Next: SGML Tags sgmltag.mod.xsl
Previous: sect1 sect2 sect3 sect4 sect5 Up: Sections sections.mod.xsl

Reference Section

## Name

section|simplesect — Process recursive and leaf sections

## Synopsis

    <xsl:template match="section|simplesect">
    <xsl:param name="bridgehead" select="ancestor::preface|ancestor::colophon|ancestor::dedication"/>
    <xsl:param name="level" select="count(ancestor::section)+1"/>
    <xsl:variable name="template">
    			<xsl:choose>
    				<xsl:when test="$level<6">
    					<xsl:text>sect</xsl:text>
    					<xsl:value-of select="$level"/>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:message>DB2LaTeX: recursive section|simplesect > 5 not well supported.</xsl:message>
    					<xsl:text>sect6</xsl:text>
    				</xsl:otherwise>
    			</xsl:choose>
    			<xsl:if test="$bridgehead"><xsl:text>*</xsl:text></xsl:if>
    		</xsl:variable>
      ...
    </xsl:template>

## A. Description

Formats a section's title (including numbering, if applicable) then allows all child elements to be processed. The title is formatted the using LaTeX mapping identified by the equivalent explicit element (e.g. `sect1` [2.0.9], etc.).

## C. Template Parameters

bridgehead

  If `true()`, the title is processed like a `bridgehead` [2.0.9] (that is, the section is unnumbered and does not appear in the `toc` [2.0.9]). This parameter defaults to `false()` unless the section appears within a preface.

level

  The numeric nesting level of the section. This is automatically calculated as "one greater than the number of ancestor `section` [2.0.9]s".

## B. Pertinent Variables

There are no configuration variables for this template.

## D. DocBook Compliance and LaTeX Notes

Titles for sections nested beyond a depth of five are formatted like `sect5` [2.0.9].

Currently, “info” elements (e.g. `sectioninfo` [2.0.9]), `subtitle` [2.0.9] and `titleabbrev` [2.0.9] are not honoured.

The use of special components such as `toc` [2.0.9], `lot` [2.0.9], `index` [2.0.9] and `glossary` [2.0.9] is unlikely to be successful.

LaTeX makes no semantic distinction between `section` [2.0.9] and `simplesect` [2.0.9].

## E. Samples and Tests

`test_article.pdf` from `test_article/article.xml`, `test_book.pdf` from `test_book/test.xml`

## F. Further Reading

- The DB2LaTeX mapping system latex.mapping.xsl

Prev | Up | Next
sect1|sect2|sect3|sect4|sect5 | Home | SGML Tags sgmltag.mod.xsl