| 1. | Depth of section numbering |
Actually, you can do it with just parameters and the gentext templates. These lines in your stylesheet customization file will do what I think you want, assuming you want to omit the unnumbered section titles from the TOC.
<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="toc.section.depth" select="2"/>
<xsl:param name="section.label.includes.component.label" select="1"/>
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="en">
<l:context name="title-numbered">
<l:template name="sect3" text="%t"/>
<l:template name="sect4" text="%t"/>
<l:template name="sect5" text="%t"/>
</l:context>
<l:context name="section-xref-numbered">
<l:template name="sect3"
text="the section called “%t”"/>
<l:template name="sect4"
text="the section called “%t”"/>
<l:template name="sect5"
text="the section called “%t”"/>
</l:context>
</l:l10n>
</l:i18n>
The first parameter turns on section numbering, and the second one limits the TOC list to sect2 at the most. The third parameter adds the chapter number to the numbering (the usual for multiple chapter numbering). The <l:i18n> stuff customizes the gentext templates, in this case for English. You'll have to do something for other languages if you use them. It redefines how the section titles and cross references are generated for sect3 through sect5 when in the 'sections being numbered' context. In this case, although sections are being numbered, you want these section levels to just display %t (title) and not %n (number). | |
| 2. | Parameters to xsl stylesheets |
Set 'paper.type' to A4. > - to set widow/orphan values? No parameters for these yet.
The 'list.item.spacing' parameter does that, but it is not a single value. It is an attribute set. See sourceforge.net for an example. There is also 'compact.list.item.spacing' for spacing="compact" lists, and 'list.block.spacing' to specify space between whole lists. I keep this fo reference page bookmarked: sourceforge.net For awhile it was out of date, but I believe it is now being kept up to date with the stylesheet releases. | |
| 3. | tips and warnings |
You do not need to do anything in your DocBook code... just make sure that you are enabling the admonition graphics in the XSL stylesheets. In your customization layer, you will need to set the parameters: On this latter one, Norm's default is to use the PNG graphics. (Note that these comments are ones that I include in my customization layer.) If you do not have a customization layer, you need one. See some of the pointers on docbook.org I also have a page with links to my customization layer at my site Next you need to copy the graphics you want to use to the subdirectory mentioned in the parameters (and relative to where your document is). Then just generate the files. It works great. You can see them in our online manual which contains 2 Warnings and a Note. This page was generated with the XSL stylesheets. | |
| 4. | Toc depth, how to change it |
I presume you mean for HTML output, in which case it does not appear to be possible by changing a parameter. Both the book TOC and the chapter TOC use the same global parameter 'toc.section.depth'. You'd have to create a customization layer that defined a new parameter and a modified TOC-generating template to use it. The TOC machinery is not simple, however. This would make a fine feature request, though. 8^) | |
| 5. | Figures and Tables in Toc. |
It seems that these are supported in the fo stylesheets for PDF output, but not in the html stylesheets. If you look in the fo/param.xsl file, you'll see these parameters: <xsl:param name="generate.division.figure.lot" select="1" /> But these are not in html/param.xsl, nor do they appear in the html templates. | |
| 6. | Changing chapter headings |
No, it is internationalized. 8^) The generated text is in the common/en.xml and other language files. Put something like this in your XSL customization file: <xsl:param name="local.l10n.xml" select="document('')"/> Note that the language files now use the l: namespace. The trick here is the select="document('') attribute. This special syntax reads the current document (the stylesheet file) into the 'local.l10n.xml' variable. When the stylesheet goes to generate text, the stylesheet first scans that variable for a match before going to the standard language files. The use of the namespace prevents accidentally picking up any literal result elements that might be lurking in the stylesheet (unlikely, but possible). | |
| 7. | How to customise localised text |
Yes, there is. Norm has provided a customization feature to that. Put something like this in your XSL customization file: <xsl:param name="local.l10n.xml" select="document('')"/> Note that the language files now use the l: namespace. The trick here is the select="document('') attribute. This special syntax reads the current document (the stylesheet file) into the 'local.l10n.xml' variable. When the stylesheet goes to generate text, the stylesheet first scans that variable for a match before going to the standard language files. The use of the namespace prevents accidentally picking up any literal result elements that might be lurking in the stylesheet (unlikely, but possible). | |
| 8. | Numbering format |
The dots are part of the generated text strings defined in common/en.xml (or whatever lang you use) in the stylesheet distribution. In that file, the <l:context name="title-numbered"> element has entries like this:
The %n is the number, and   is non-breaking space. You can customize these strings in a customization layer as described in this doc: sagehill That extra dot in the TOC is a stylesheet parameter. <xsl:param name="autotoc.label.separator" select="'. '"/> Set that to just a space. | |
| 9. | bg color on programlisting |
The attribute set shade.verbatim.properties can be customized to apply the properties you need. You shouldn't need to customize the template code to change the color. Try this in your fo customization layer: <xsl:attribute-set name="shade.verbatim.properties"> border-color="thin black ridge" background-color="silver" </xsl:attribute-set> Attribute sets are merged, so these values should override the default background color and add the border color. See this reference for more information on customizing attribute sets: sagehill | |
| 10. | Decorating titles |
You can do this without modifying templates because there is an attribute-set for section titles that you can customize. For example, a rule below would be done with the following in a customization layer: <xsl:attribute-set name="section.title.properties"> <xsl:attribute name="border-bottom-style">solid</xsl:attribute> </xsl:attribute-set> See this doc for more info on using such attribute-sets: Bobs pages You'll also need an XSL-FO reference to know what all the possible properties are. | |
| 11. | Using locale specific content |
The common/fr.xml file included with the 1.62.0 distribution is indeed generated from the gentext/locale/fr.xml file in CVS. The generator stylesheet now fills in any missing items in a given translation with English so at least nothing breaks in runtime because of a missing string. You should use the distributed fr.xml file as a guide to what needs translation. Any item with a lang="en" was inserted during the build to backfill missing items. It is possible that other items in the source fr.xml file are also untranslated, but the generator cannot detect those. You don't have CVS checkin authorization, so just send an updated file directly to me (not the list because attachments are stripped off) and I will incorporate the changes. You can edit the distributed file or a copy of the CVS file, I can handle either one. I'll add a README to the locale directory to explain this process. |