hyphenate.verbatim.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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="hyphenate.verbatim">
  7. <refmeta>
  8. <refentrytitle>hyphenate.verbatim</refentrytitle>
  9. <refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo>
  10. </refmeta>
  11. <refnamediv>
  12. <refname>hyphenate.verbatim</refname>
  13. <refpurpose>Should verbatim environments be hyphenated on space characters?</refpurpose>
  14. </refnamediv>
  15. <refsynopsisdiv>
  16. <src:fragment xml:id="hyphenate.verbatim.frag"><xsl:param name="hyphenate.verbatim" select="0"/></src:fragment>
  17. </refsynopsisdiv>
  18. <refsection><info><title>Description</title></info>
  19. <para>If the lines of program listing are too long to fit into one
  20. line it is quite common to split them at space and indicite by hook
  21. arrow that code continues on the next line. You can turn on this
  22. behaviour for <tag>programlisting</tag>,
  23. <tag>screen</tag> and <tag>synopsis</tag> elements by
  24. using this parameter.</para>
  25. <para>Note that you must also enable line wrapping for verbatim environments and
  26. select appropriate hyphenation character (e.g. hook arrow). This can
  27. be done using <parameter>monospace.verbatim.properties</parameter>
  28. attribute set:</para>
  29. <programlisting>&lt;xsl:attribute-set name="monospace.verbatim.properties"
  30. use-attribute-sets="verbatim.properties monospace.properties"&gt;
  31. &lt;xsl:attribute name="wrap-option"&gt;wrap&lt;/xsl:attribute&gt;
  32. &lt;xsl:attribute name="hyphenation-character"&gt;&amp;#x25BA;&lt;/xsl:attribute&gt;
  33. &lt;/xsl:attribute-set&gt;</programlisting>
  34. <para>For a list of arrows available in Unicode see <uri xlink:href="http://www.unicode.org/charts/PDF/U2190.pdf">http://www.unicode.org/charts/PDF/U2190.pdf</uri> and <uri xlink:href="http://www.unicode.org/charts/PDF/U2900.pdf">http://www.unicode.org/charts/PDF/U2900.pdf</uri> and make sure that
  35. selected character is available in the font you are using for verbatim
  36. environments.</para>
  37. </refsection>
  38. </refentry>