man.charmap.subset.profile.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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="man.charmap.subset.profile">
  7. <refmeta>
  8. <refentrytitle>man.charmap.subset.profile</refentrytitle>
  9. <refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>
  10. </refmeta>
  11. <refnamediv>
  12. <refname>man.charmap.subset.profile</refname>
  13. <refpurpose>Profile of character map subset</refpurpose>
  14. </refnamediv>
  15. <refsynopsisdiv>
  16. <src:fragment xml:id="man.charmap.subset.profile.frag">
  17. <xsl:param name="man.charmap.subset.profile">
  18. @*[local-name() = 'block'] = 'Miscellaneous Technical' or
  19. (@*[local-name() = 'block'] = 'C1 Controls And Latin-1 Supplement (Latin-1 Supplement)' and
  20. (@*[local-name() = 'class'] = 'symbols' or
  21. @*[local-name() = 'class'] = 'letters')
  22. ) or
  23. @*[local-name() = 'block'] = 'Latin Extended-A'
  24. or
  25. (@*[local-name() = 'block'] = 'General Punctuation' and
  26. (@*[local-name() = 'class'] = 'spaces' or
  27. @*[local-name() = 'class'] = 'dashes' or
  28. @*[local-name() = 'class'] = 'quotes' or
  29. @*[local-name() = 'class'] = 'bullets'
  30. )
  31. ) or
  32. @*[local-name() = 'name'] = 'HORIZONTAL ELLIPSIS' or
  33. @*[local-name() = 'name'] = 'WORD JOINER' or
  34. @*[local-name() = 'name'] = 'SERVICE MARK' or
  35. @*[local-name() = 'name'] = 'TRADE MARK SIGN' or
  36. @*[local-name() = 'name'] = 'ZERO WIDTH NO-BREAK SPACE'
  37. </xsl:param>
  38. </src:fragment>
  39. </refsynopsisdiv>
  40. <refsection><info><title>Description</title></info>
  41. <para>If the value of the
  42. <parameter>man.charmap.use.subset</parameter> parameter is non-zero,
  43. and your DocBook source is not written in English (that
  44. is, if the <tag class="attribute">lang</tag> or <tag
  45. class="attribute">xml:lang</tag> attribute on the root element
  46. in your DocBook source or on the first <tag>refentry</tag>
  47. element in your source has a value other than
  48. <literal>en</literal>), then the character-map subset specified
  49. by the <parameter>man.charmap.subset.profile</parameter>
  50. parameter is used instead of the full roff character map.</para>
  51. <para>Otherwise, if the <tag class="attribute">lang</tag> or <tag
  52. class="attribute">xml:lang</tag> attribute on the root
  53. element in your DocBook
  54. source or on the first <tag>refentry</tag> element in your source
  55. has the value <literal>en</literal> or if it has no <tag
  56. class="attribute">lang</tag> or <tag
  57. class="attribute">xml:lang</tag> attribute, then the character-map
  58. subset specified by the
  59. <parameter>man.charmap.subset.profile.english</parameter>
  60. parameter is used instead of
  61. <parameter>man.charmap.subset.profile</parameter>.</para>
  62. <para>The difference between the two subsets is that
  63. <parameter>man.charmap.subset.profile</parameter> provides
  64. mappings for characters in Western European languages that are
  65. not part of the Roman (English) alphabet (ASCII character set).</para>
  66. <para>The value of <parameter>man.charmap.subset.profile</parameter>
  67. is a string representing an XPath expression that matches attribute
  68. names and values for <tag
  69. namespace="http://docbook.sf.net/xmlns/unichar/1.0">output-character</tag>
  70. elements in the character map.</para>
  71. <para>The attributes supported in the <link xlink:href="http://docbook.sourceforge.net/snapshot/xsl/manpages/charmap.groff.xsl">standard roff character map included in the distribution</link> are:
  72. <variablelist>
  73. <varlistentry>
  74. <term>character</term>
  75. <listitem>
  76. <simpara>a raw Unicode character or numeric Unicode
  77. character-entity value (either in decimal or hex); all
  78. characters have this attribute</simpara>
  79. </listitem>
  80. </varlistentry>
  81. <varlistentry>
  82. <term>name</term>
  83. <listitem>
  84. <simpara>a standard full/long ISO/Unicode character name (e.g.,
  85. "OHM SIGN"); all characters have this attribute</simpara>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry>
  89. <term>block</term>
  90. <listitem>
  91. <simpara>a standard Unicode "block" name (e.g., "General
  92. Punctuation"); all characters have this attribute. For the full
  93. list of Unicode block names supported in the standard roff
  94. character map, see <xref linkend="BlocksAndClasses"/>.</simpara>
  95. </listitem>
  96. </varlistentry>
  97. <varlistentry>
  98. <term>class</term>
  99. <listitem>
  100. <simpara>a class of characters (e.g., "spaces"). Not all
  101. characters have this attribute; currently, it is used only with
  102. certain characters within the "C1 Controls And Latin-1
  103. Supplement" and "General Punctuation" blocks. For details, see
  104. <xref linkend="BlocksAndClasses"/>.</simpara>
  105. </listitem>
  106. </varlistentry>
  107. <varlistentry>
  108. <term>entity</term>
  109. <listitem>
  110. <simpara>an ISO entity name (e.g., "ohm"); not all characters
  111. have this attribute, because not all characters have ISO entity
  112. names; for example, of the 800 or so characters in the standard
  113. roff character map included in the distribution, only around 300
  114. have ISO entity names.
  115. </simpara>
  116. </listitem>
  117. </varlistentry>
  118. <varlistentry>
  119. <term>string</term>
  120. <listitem>
  121. <simpara>a string representing an roff/groff escape-code (with
  122. "@esc@" used in place of the backslash), or a simple ASCII
  123. string; all characters in the roff character map have this
  124. attribute</simpara>
  125. </listitem>
  126. </varlistentry>
  127. </variablelist>
  128. </para>
  129. <para>The value of <parameter>man.charmap.subset.profile</parameter>
  130. is evaluated as an XPath expression at run-time to select a portion of
  131. the roff character map to use. You can tune the subset used by adding
  132. or removing parts. For example, if you need to use a wide range of
  133. mathematical operators in a document, and you want to have them
  134. converted into roff markup properly, you might add the following:
  135. <literallayout class="monospaced"> @*[local-name() = 'block'] ='MathematicalOperators' </literallayout>
  136. That will cause a additional set of around 67 additional "math"
  137. characters to be converted into roff markup. </para>
  138. <note>
  139. <para>Depending on which XSLT engine you use, either the EXSLT
  140. <function>dyn:evaluate</function> extension function (for xsltproc or
  141. Xalan) or <function>saxon:evaluate</function> extension function (for
  142. Saxon) are used to dynamically evaluate the value of
  143. <parameter>man.charmap.subset.profile</parameter> at run-time. If you
  144. don't use xsltproc, Saxon, Xalan -- or some other XSLT engine that
  145. supports <function>dyn:evaluate</function> -- you must either set the
  146. value of the <parameter>man.charmap.use.subset</parameter> parameter
  147. to zero and process your documents using the full character map
  148. instead, or set the value of the
  149. <parameter>man.charmap.enabled</parameter> parameter to zero instead
  150. (so that character-map processing is disabled completely.</para>
  151. </note>
  152. <para>An alternative to using
  153. <parameter>man.charmap.subset.profile</parameter> is to create your
  154. own custom character map, and set the value of
  155. <parameter>man.charmap.uri</parameter> to the URI/filename for
  156. that. If you use a custom character map, you will probably want to
  157. include in it just the characters you want to use, and so you will
  158. most likely also want to set the value of
  159. <parameter>man.charmap.use.subset</parameter> to zero.</para>
  160. <para>You can create a
  161. custom character map by making a copy of the <link xlink:href="http://docbook.sourceforge.net/snapshot/xsl/manpages/charmap.groff.xsl">standard roff character map</link> provided in the distribution, and
  162. then adding to, changing, and/or deleting from that.</para>
  163. <caution>
  164. <para>If you author your DocBook XML source in UTF-8 or UTF-16
  165. encoding and aren't sure what OSes or environments your man-page
  166. output might end up being viewed on, and not sure what version of
  167. nroff/groff those environments might have, you should be careful about
  168. what Unicode symbols and special characters you use in your source and
  169. what parts you add to the value of
  170. <parameter>man.charmap.subset.profile</parameter>.</para>
  171. <para>Many of the escape codes used are specific to groff and using
  172. them may not provide the expected output on an OS or environment that
  173. uses nroff instead of groff.</para>
  174. <para>On the other hand, if you intend for your man-page output to be
  175. viewed only on modern systems (for example, GNU/Linux systems, FreeBSD
  176. systems, or Cygwin environments) that have a good, up-to-date groff,
  177. then you can safely include a wide range of Unicode symbols and
  178. special characters in your UTF-8 or UTF-16 encoded DocBook XML source
  179. and add any of the supported Unicode block names to the value of
  180. <parameter>man.charmap.subset.profile</parameter>.</para>
  181. </caution>
  182. <para>For other details, see the documentation for the
  183. <parameter>man.charmap.use.subset</parameter> parameter.</para>
  184. <refsection xml:id="BlocksAndClasses"><info><title>Supported Unicode block names and "class" values</title></info>
  185. <para>Below is the full list of Unicode block names and "class"
  186. values supported in the standard roff stylesheet provided in the
  187. distribution, along with a description of which codepoints from the
  188. Unicode range corresponding to that block name or block/class
  189. combination are supported.</para>
  190. <itemizedlist>
  191. <listitem>
  192. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=C1%20Controls%20and%20Latin-1%20Supplement%20(Latin-1%20Supplement)">C1 Controls And Latin-1 Supplement (Latin-1 Supplement)</link> (x00a0 to x00ff)
  193. <itemizedlist><info><title>class values</title></info>
  194. <listitem>
  195. <para>symbols</para>
  196. </listitem>
  197. <listitem>
  198. <para>letters</para>
  199. </listitem>
  200. </itemizedlist></para>
  201. </listitem>
  202. <listitem>
  203. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Latin%20Extended-A">Latin Extended-A</link> (x0100 to x017f, partial)</para>
  204. </listitem>
  205. <listitem>
  206. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Spacing%20Modifier%20Letters">Spacing Modifier Letters</link> (x02b0 to x02ee, partial)</para>
  207. </listitem>
  208. <listitem>
  209. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Greek%20and%20Coptic">Greek and Coptic</link> (x0370 to x03ff, partial)</para>
  210. </listitem>
  211. <listitem>
  212. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=General%20Punctuation">General Punctuation</link> (x2000 to x206f, partial)
  213. <itemizedlist><info><title>class values</title></info>
  214. <listitem>
  215. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;start=8192&amp;end=8203">spaces</link></para>
  216. </listitem>
  217. <listitem>
  218. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;start=8208&amp;end=8213">dashes</link></para>
  219. </listitem>
  220. <listitem>
  221. <para>quotes</para>
  222. </listitem>
  223. <listitem>
  224. <para>daggers</para>
  225. </listitem>
  226. <listitem>
  227. <para>bullets</para>
  228. </listitem>
  229. <listitem>
  230. <para>leaders</para>
  231. </listitem>
  232. <listitem>
  233. <para>primes</para>
  234. </listitem>
  235. </itemizedlist>
  236. </para>
  237. </listitem>
  238. <listitem>
  239. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Superscripts%20and%20Subscripts">Superscripts and Subscripts</link> (x2070 to x209f)</para>
  240. </listitem>
  241. <listitem>
  242. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Currency%20Symbols">Currency Symbols</link> (x20a0 to x20b1)</para>
  243. </listitem>
  244. <listitem>
  245. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Letterlike%20Symbols">Letterlike Symbols</link> (x2100 to x214b)</para>
  246. </listitem>
  247. <listitem>
  248. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Number%20Forms">Number Forms</link> (x2150 to x218f)</para>
  249. </listitem>
  250. <listitem>
  251. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Arrows">Arrows</link> (x2190 to x21ff, partial)</para>
  252. </listitem>
  253. <listitem>
  254. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Mathematical%20Operators">Mathematical Operators</link> (x2200 to x22ff, partial)</para>
  255. </listitem>
  256. <listitem>
  257. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Control%20Pictures">Control Pictures</link> (x2400 to x243f)</para>
  258. </listitem>
  259. <listitem>
  260. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Enclosed%20Alphanumerics">Enclosed Alphanumerics</link> (x2460 to x24ff)</para>
  261. </listitem>
  262. <listitem>
  263. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Geometric%20Shapes">Geometric Shapes</link> (x25a0 to x25f7, partial)</para>
  264. </listitem>
  265. <listitem>
  266. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Miscellaneous%20Symbols">Miscellaneous Symbols</link> (x2600 to x26ff, partial)</para>
  267. </listitem>
  268. <listitem>
  269. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Dingbats">Dingbats</link> (x2700 to x27be, partial)</para>
  270. </listitem>
  271. <listitem>
  272. <para><link xlink:href="http://zvon.org/other/charSearch/PHP/search.php?searchType=103&amp;id=Alphabetic%20Presentation%20Forms">Alphabetic Presentation Forms</link> (xfb00 to xfb04 only)</para>
  273. </listitem>
  274. </itemizedlist>
  275. </refsection>
  276. </refsection>
  277. </refentry>