toc.line.properties.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <refentry xmlns="http://docbook.org/ns/docbook"
  2. xmlns:xlink="http://www.w3.org/1999/xlink"
  3. xmlns:xi="http://www.w3.org/2001/XInclude"
  4. xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
  5. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. version="5.0" xml:id="toc.line.properties">
  7. <refmeta>
  8. <refentrytitle>toc.line.properties</refentrytitle>
  9. <refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo>
  10. </refmeta>
  11. <refnamediv>
  12. <refname>toc.line.properties</refname>
  13. <refpurpose>Properties for lines in ToCs and LoTs</refpurpose>
  14. </refnamediv>
  15. <refsynopsisdiv>
  16. <src:fragment xml:id="toc.line.properties.frag">
  17. <xsl:attribute-set name="toc.line.properties">
  18. <xsl:attribute name="text-align-last">justify</xsl:attribute>
  19. <xsl:attribute name="text-align">start</xsl:attribute>
  20. <xsl:attribute name="end-indent"><xsl:value-of select="concat($toc.indent.width, 'pt')"/></xsl:attribute>
  21. <xsl:attribute name="last-line-end-indent"><xsl:value-of select="concat('-', $toc.indent.width, 'pt')"/></xsl:attribute>
  22. </xsl:attribute-set>
  23. </src:fragment>
  24. </refsynopsisdiv>
  25. <refsection><info><title>Description</title></info>
  26. <para>Properties which are applied to every line in ToC (or LoT). You can
  27. modify them in order to change appearance of all, or some lines. For
  28. example, in order to make lines for chapters bold, specify the
  29. following in your customization layer:</para>
  30. <programlisting>&lt;xsl:attribute-set name="toc.line.properties"&gt;
  31. &lt;xsl:attribute name="font-weight"&gt;
  32. &lt;xsl:choose>
  33. &lt;xsl:when test="self::chapter">bold&lt;/xsl:when&gt;
  34. &lt;xsl:otherwise&gt;normal&lt;/xsl:otherwise&gt;
  35. &lt;/xsl:choose>
  36. &lt;/xsl:attribute&gt;
  37. &lt;/xsl:attribute-set&gt;</programlisting>
  38. </refsection>
  39. </refentry>