]>
Commit | Line | Data |
---|---|---|
5162e697 | 1 | ## linkgit: macro |
d1c2e113 | 2 | # |
5162e697 | 3 | # Usage: linkgit:command[manpage-section] |
d1c2e113 SV |
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. | |
9 | ||
babfaba2 | 10 | [attributes] |
c0a5e2d4 | 11 | asterisk=* |
4c7100a9 JH |
12 | plus=+ |
13 | caret=^ | |
a3e65d74 JF |
14 | startsb=[ |
15 | endsb=] | |
54bd2558 | 16 | tilde=~ |
babfaba2 | 17 | |
d1c2e113 | 18 | ifdef::backend-docbook[] |
5162e697 | 19 | [linkgit-inlinemacro] |
d1c2e113 SV |
20 | {0%{target}} |
21 | {0#<citerefentry>} | |
22 | {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>} | |
23 | {0#</citerefentry>} | |
24 | endif::backend-docbook[] | |
25 | ||
e920b565 | 26 | ifdef::backend-docbook[] |
7f55cf45 | 27 | ifndef::docbook-xsl-172[] |
e920b565 | 28 | # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this. |
7f55cf45 | 29 | # v1.72 breaks with this because it replaces dots not in roff requests. |
e920b565 FD |
30 | [listingblock] |
31 | <example><title>{title}</title> | |
32 | <literallayout> | |
281a53bb JP |
33 | ifdef::doctype-manpage[] |
34 | .ft C | |
35 | endif::doctype-manpage[] | |
e920b565 | 36 | | |
281a53bb JP |
37 | ifdef::doctype-manpage[] |
38 | .ft | |
39 | endif::doctype-manpage[] | |
e920b565 FD |
40 | </literallayout> |
41 | {title#}</example> | |
7f55cf45 | 42 | endif::docbook-xsl-172[] |
9b6f84d2 JF |
43 | |
44 | ifdef::docbook-xsl-172[] | |
45 | ifdef::doctype-manpage[] | |
46 | # The following two small workarounds insert a simple paragraph after screen | |
47 | [listingblock] | |
48 | <example><title>{title}</title> | |
49 | <screen> | |
50 | | | |
51 | </screen><simpara></simpara> | |
52 | {title#}</example> | |
53 | ||
54 | [verseblock] | |
55 | <formalpara{id? id="{id}"}><title>{title}</title><para> | |
56 | {title%}<literallayout{id? id="{id}"}> | |
57 | {title#}<literallayout> | |
58 | | | |
59 | </literallayout><simpara></simpara> | |
60 | {title#}</para></formalpara> | |
61 | endif::doctype-manpage[] | |
62 | endif::docbook-xsl-172[] | |
e920b565 FD |
63 | endif::backend-docbook[] |
64 | ||
d3d4fa86 | 65 | ifdef::doctype-manpage[] |
7ef195ba FL |
66 | ifdef::backend-docbook[] |
67 | [header] | |
68 | template::[header-declarations] | |
69 | <refentry> | |
70 | <refmeta> | |
71 | <refentrytitle>{mantitle}</refentrytitle> | |
72 | <manvolnum>{manvolnum}</manvolnum> | |
73 | <refmiscinfo class="source">Git</refmiscinfo> | |
4159c578 | 74 | <refmiscinfo class="version">{git_version}</refmiscinfo> |
7ef195ba FL |
75 | <refmiscinfo class="manual">Git Manual</refmiscinfo> |
76 | </refmeta> | |
77 | <refnamediv> | |
78 | <refname>{manname}</refname> | |
79 | <refpurpose>{manpurpose}</refpurpose> | |
80 | </refnamediv> | |
81 | endif::backend-docbook[] | |
d3d4fa86 | 82 | endif::doctype-manpage[] |
7ef195ba | 83 | |
d1c2e113 | 84 | ifdef::backend-xhtml11[] |
5162e697 | 85 | [linkgit-inlinemacro] |
d1c2e113 SV |
86 | <a href="{target}.html">{target}{0?({0})}</a> |
87 | endif::backend-xhtml11[] |