1 ## linkgit: macro
2 #
3 # Usage: linkgit:command[manpage-section]
4 #
5 # Note, {0} is the manpage section, while {target} is the command.
6 #
7 # Show GIT link as: <command>(<section>); if section is defined, else just show
8 # the command.
10 [attributes]
11 asterisk=*
12 plus=+
13 caret=^
14 startsb=[
15 endsb=]
16 tilde=~
18 ifdef::backend-docbook[]
19 [linkgit-inlinemacro]
20 {0%{target}}
21 {0#<citerefentry>}
22 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
23 {0#</citerefentry>}
24 endif::backend-docbook[]
26 ifdef::backend-docbook[]
27 ifndef::docbook-xsl-172[]
28 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
29 # v1.72 breaks with this because it replaces dots not in roff requests.
30 [listingblock]
31 <example><title>{title}</title>
32 <literallayout>
33 ifdef::doctype-manpage[]
34 .ft C
35 endif::doctype-manpage[]
36 |
37 ifdef::doctype-manpage[]
38 .ft
39 endif::doctype-manpage[]
40 </literallayout>
41 {title#}</example>
42 endif::docbook-xsl-172[]
43 endif::backend-docbook[]
45 ifdef::doctype-manpage[]
46 ifdef::backend-docbook[]
47 [header]
48 template::[header-declarations]
49 <refentry>
50 <refmeta>
51 <refentrytitle>{mantitle}</refentrytitle>
52 <manvolnum>{manvolnum}</manvolnum>
53 <refmiscinfo class="source">Git</refmiscinfo>
54 <refmiscinfo class="version">{git_version}</refmiscinfo>
55 <refmiscinfo class="manual">Git Manual</refmiscinfo>
56 </refmeta>
57 <refnamediv>
58 <refname>{manname}</refname>
59 <refpurpose>{manpurpose}</refpurpose>
60 </refnamediv>
61 endif::backend-docbook[]
62 endif::doctype-manpage[]
64 ifdef::backend-xhtml11[]
65 [linkgit-inlinemacro]
66 <a href="{target}.html">{target}{0?({0})}</a>
67 endif::backend-xhtml11[]