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