5 # Taken from git; modified for CDimgtools.
7 # Usage: linkpage:command[manpage-section]
8 # Usage: linkpage:htmlfile[]
10 # Note, {0} is the manpage section, while {target} is the command.
12 # Show GIT link as: <command>(<section>); if section is defined, else just show
16 (?su)[\\]?(?P<name>linkpage):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
30 ifdef::backend-docbook[]
31 [linkpage-inlinemacro]
34 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
36 endif::backend-docbook[]
38 ifdef::backend-docbook[]
39 ifndef::git-asciidoc-no-roff[]
40 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
41 # v1.72 breaks with this because it replaces dots not in roff requests.
43 <example><title>{title}</title>
45 ifdef::doctype-manpage[]
47 endif::doctype-manpage[]
49 ifdef::doctype-manpage[]
51 endif::doctype-manpage[]
54 endif::git-asciidoc-no-roff[]
56 ifdef::git-asciidoc-no-roff[]
57 ifdef::doctype-manpage[]
58 # The following two small workarounds insert a simple paragraph after screen
60 <example><title>{title}</title>
63 </literallayout><simpara></simpara>
67 <formalpara{id? id="{id}"}><title>{title}</title><para>
68 {title%}<literallayout{id? id="{id}"}>
69 {title#}<literallayout>
72 {title#}</para></formalpara>
73 {title%}<simpara></simpara>
74 endif::doctype-manpage[]
75 endif::git-asciidoc-no-roff[]
76 endif::backend-docbook[]
78 ifdef::doctype-manpage[]
79 ifdef::backend-docbook[]
81 template::[header-declarations]
84 <refentrytitle>{mantitle}</refentrytitle>
85 <manvolnum>{manvolnum}</manvolnum>
86 <refmiscinfo class="source">CDimgtools</refmiscinfo>
87 <refmiscinfo class="version">{version}</refmiscinfo>
88 <refmiscinfo class="manual">CDimgtools commands</refmiscinfo>
91 <refname>{manname}</refname>
92 <refpurpose>{manpurpose}</refpurpose>
94 endif::backend-docbook[]
95 endif::doctype-manpage[]
97 ifdef::backend-xhtml11[]
99 git-relative-html-prefix=
100 [linkpage-inlinemacro]
101 <a href="{git-relative-html-prefix}{target}{0?.{0}}.html">{target}{0?({0})}</a>
102 endif::backend-xhtml11[]
107 #(^|[^-\\])--($|[^-])=\1--\2