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>.*?)\]=
24 ifdef::backend-docbook[]
28 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
30 endif::backend-docbook[]
32 ifdef::backend-docbook[]
33 ifndef::git-asciidoc-no-roff[]
34 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
35 # v1.72 breaks with this because it replaces dots not in roff requests.
37 <example><title>{title}</title>
39 ifdef::doctype-manpage[]
41 endif::doctype-manpage[]
43 ifdef::doctype-manpage[]
45 endif::doctype-manpage[]
48 endif::git-asciidoc-no-roff[]
50 ifdef::git-asciidoc-no-roff[]
51 ifdef::doctype-manpage[]
52 # The following two small workarounds insert a simple paragraph after screen
54 <example><title>{title}</title>
57 </literallayout><simpara></simpara>
61 <formalpara{id? id="{id}"}><title>{title}</title><para>
62 {title%}<literallayout{id? id="{id}"}>
63 {title#}<literallayout>
66 {title#}</para></formalpara>
67 {title%}<simpara></simpara>
68 endif::doctype-manpage[]
69 endif::git-asciidoc-no-roff[]
70 endif::backend-docbook[]
72 ifdef::doctype-manpage[]
73 ifdef::backend-docbook[]
75 template::[header-declarations]
78 <refentrytitle>{mantitle}</refentrytitle>
79 <manvolnum>{manvolnum}</manvolnum>
80 <refmiscinfo class="source">Git</refmiscinfo>
81 <refmiscinfo class="version">{git_version}</refmiscinfo>
82 <refmiscinfo class="manual">Git Manual</refmiscinfo>
85 <refname>{manname}</refname>
86 <refpurpose>{manpurpose}</refpurpose>
88 endif::backend-docbook[]
89 endif::doctype-manpage[]
91 ifdef::backend-xhtml11[]
93 <a href="{target}.html">{target}{0?({0})}</a>
94 endif::backend-xhtml11[]