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>.*?)\]=
21 ifdef::backend-docbook[]
25 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
27 endif::backend-docbook[]
29 ifdef::backend-docbook[]
30 ifndef::docbook-xsl-172[]
31 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
32 # v1.72 breaks with this because it replaces dots not in roff requests.
34 <example><title>{title}</title>
36 ifdef::doctype-manpage[]
38 endif::doctype-manpage[]
40 ifdef::doctype-manpage[]
42 endif::doctype-manpage[]
45 endif::docbook-xsl-172[]
47 ifdef::docbook-xsl-172[]
48 ifdef::doctype-manpage[]
49 # The following two small workarounds insert a simple paragraph after screen
51 <example><title>{title}</title>
54 </screen><simpara></simpara>
58 <formalpara{id? id="{id}"}><title>{title}</title><para>
59 {title%}<literallayout{id? id="{id}"}>
60 {title#}<literallayout>
62 </literallayout><simpara></simpara>
63 {title#}</para></formalpara>
64 endif::doctype-manpage[]
65 endif::docbook-xsl-172[]
66 endif::backend-docbook[]
68 ifdef::doctype-manpage[]
69 ifdef::backend-docbook[]
71 template::[header-declarations]
74 <refentrytitle>{mantitle}</refentrytitle>
75 <manvolnum>{manvolnum}</manvolnum>
76 <refmiscinfo class="source">Git</refmiscinfo>
77 <refmiscinfo class="version">{git_version}</refmiscinfo>
78 <refmiscinfo class="manual">Git Manual</refmiscinfo>
81 <refname>{manname}</refname>
82 <refpurpose>{manpurpose}</refpurpose>
84 endif::backend-docbook[]
85 endif::doctype-manpage[]
87 ifdef::backend-xhtml11[]
89 <a href="{target}.html">{target}{0?({0})}</a>
90 endif::backend-xhtml11[]