2da867d2f8dd1e5272d33571062bda5f169cd278
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.
9
10[attributes]
11asterisk=*
12plus=+
13caret=^
14startsb=[
15endsb=]
16tilde=~
17
18ifdef::backend-docbook[]
19[linkgit-inlinemacro]
20{0%{target}}
21{0#<citerefentry>}
22{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
23{0#</citerefentry>}
24endif::backend-docbook[]
25
26ifdef::backend-docbook[]
27ifndef::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>
33ifdef::doctype-manpage[]
34 .ft C
35endif::doctype-manpage[]
36|
37ifdef::doctype-manpage[]
38 .ft
39endif::doctype-manpage[]
40</literallayout>
41{title#}</example>
42endif::docbook-xsl-172[]
43
44ifdef::docbook-xsl-172[]
45ifdef::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>
61endif::doctype-manpage[]
62endif::docbook-xsl-172[]
63endif::backend-docbook[]
64
65ifdef::doctype-manpage[]
66ifdef::backend-docbook[]
67[header]
68template::[header-declarations]
69<refentry>
70<refmeta>
71<refentrytitle>{mantitle}</refentrytitle>
72<manvolnum>{manvolnum}</manvolnum>
73<refmiscinfo class="source">Git</refmiscinfo>
74<refmiscinfo class="version">{git_version}</refmiscinfo>
75<refmiscinfo class="manual">Git Manual</refmiscinfo>
76</refmeta>
77<refnamediv>
78 <refname>{manname}</refname>
79 <refpurpose>{manpurpose}</refpurpose>
80</refnamediv>
81endif::backend-docbook[]
82endif::doctype-manpage[]
83
84ifdef::backend-xhtml11[]
85[linkgit-inlinemacro]
86<a href="{target}.html">{target}{0?({0})}</a>
87endif::backend-xhtml11[]