3 # Usage: linkgit:command[manpage-section]
5 # Note, {0} is the manpage section, while {target} is the command.
7 # Show Git link as: <command>(<section>); if section is defined, else just show
11 (?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
25 ifdef::backend-docbook[]
29 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
31 endif::backend-docbook[]
33 ifdef::backend-docbook[]
34 ifdef::doctype-manpage[]
35 # The following two small workarounds insert a simple paragraph after screen
37 <example><title>{title}</title>
38 <literallayout class="monospaced">
40 </literallayout><simpara></simpara>
44 <formalpara{id? id="{id}"}><title>{title}</title><para>
45 {title%}<literallayout{id? id="{id}"}>
46 {title#}<literallayout>
49 {title#}</para></formalpara>
50 {title%}<simpara></simpara>
51 endif::doctype-manpage[]
52 endif::backend-docbook[]
54 ifdef::doctype-manpage[]
55 ifdef::backend-docbook[]
57 template::[header-declarations]
60 <refentrytitle>{mantitle}</refentrytitle>
61 <manvolnum>{manvolnum}</manvolnum>
62 <refmiscinfo class="source">{mansource}</refmiscinfo>
63 <refmiscinfo class="version">{manversion}</refmiscinfo>
64 <refmiscinfo class="manual">{manmanual}</refmiscinfo>
67 <refname>{manname}</refname>
68 <refpurpose>{manpurpose}</refpurpose>
70 endif::backend-docbook[]
71 endif::doctype-manpage[]
73 ifdef::backend-xhtml11[]
75 git-relative-html-prefix=
77 <a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
78 endif::backend-xhtml11[]