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