asciidoc.conf 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ## linkperf: macro
  2. #
  3. # Usage: linkperf:command[manpage-section]
  4. #
  5. # Note, {0} is the manpage section, while {target} is the command.
  6. #
  7. # Show PERF link as: <command>(<section>); if section is defined, else just show
  8. # the command.
  9. [macros]
  10. (?su)[\\]?(?P<name>linkperf):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
  11. [attributes]
  12. asterisk=&#42;
  13. plus=&#43;
  14. caret=&#94;
  15. startsb=&#91;
  16. endsb=&#93;
  17. tilde=&#126;
  18. ifdef::backend-docbook[]
  19. [linkperf-inlinemacro]
  20. {0%{target}}
  21. {0#<citerefentry>}
  22. {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
  23. {0#</citerefentry>}
  24. endif::backend-docbook[]
  25. ifdef::backend-docbook[]
  26. ifndef::perf-asciidoc-no-roff[]
  27. # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
  28. # v1.72 breaks with this because it replaces dots not in roff requests.
  29. [listingblock]
  30. <example><title>{title}</title>
  31. <literallayout>
  32. ifdef::doctype-manpage[]
  33. &#10;.ft C&#10;
  34. endif::doctype-manpage[]
  35. |
  36. ifdef::doctype-manpage[]
  37. &#10;.ft&#10;
  38. endif::doctype-manpage[]
  39. </literallayout>
  40. {title#}</example>
  41. endif::perf-asciidoc-no-roff[]
  42. ifdef::perf-asciidoc-no-roff[]
  43. ifdef::doctype-manpage[]
  44. # The following two small workarounds insert a simple paragraph after screen
  45. [listingblock]
  46. <example><title>{title}</title>
  47. <literallayout>
  48. |
  49. </literallayout><simpara></simpara>
  50. {title#}</example>
  51. [verseblock]
  52. <formalpara{id? id="{id}"}><title>{title}</title><para>
  53. {title%}<literallayout{id? id="{id}"}>
  54. {title#}<literallayout>
  55. |
  56. </literallayout>
  57. {title#}</para></formalpara>
  58. {title%}<simpara></simpara>
  59. endif::doctype-manpage[]
  60. endif::perf-asciidoc-no-roff[]
  61. endif::backend-docbook[]
  62. ifdef::doctype-manpage[]
  63. ifdef::backend-docbook[]
  64. [header]
  65. template::[header-declarations]
  66. <refentry>
  67. <refmeta>
  68. <refentrytitle>{mantitle}</refentrytitle>
  69. <manvolnum>{manvolnum}</manvolnum>
  70. <refmiscinfo class="source">perf</refmiscinfo>
  71. <refmiscinfo class="version">{perf_version}</refmiscinfo>
  72. <refmiscinfo class="manual">perf Manual</refmiscinfo>
  73. </refmeta>
  74. <refnamediv>
  75. <refname>{manname}</refname>
  76. <refpurpose>{manpurpose}</refpurpose>
  77. </refnamediv>
  78. endif::backend-docbook[]
  79. endif::doctype-manpage[]
  80. ifdef::backend-xhtml11[]
  81. [linkperf-inlinemacro]
  82. <a href="{target}.html">{target}{0?({0})}</a>
  83. endif::backend-xhtml11[]