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