3 # Usage: linkgit:command[manpage-section]
5 # Note, {0} is the manpage section, while {target} is the command.
7 # Show Git link as: <command>(<section>); if section is defined, else just show
11 (?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
12 (?P<name>linkman):(?P<target>\w+)\[(?P<attrlist>\d+)]=
13 (?P<name>linkstgsub):(?P<target>\w+)\[]=
14 (?P<name>linkstg):(?P<target>\w+)\[]=
28 ifdef::backend-docbook[]
32 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
34 endif::backend-docbook[]
36 ifdef::backend-docbook[]
37 ifndef::stgit-asciidoc-no-roff[]
38 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
39 # v1.72 breaks with this because it replaces dots not in roff requests.
41 <example><title>{title}</title>
42 <literallayout class="monospaced">
43 ifdef::doctype-manpage[]
45 endif::doctype-manpage[]
47 ifdef::doctype-manpage[]
49 endif::doctype-manpage[]
52 endif::stgit-asciidoc-no-roff[]
54 ifdef::stgit-asciidoc-no-roff[]
55 ifdef::doctype-manpage[]
56 # The following two small workarounds insert a simple paragraph after screen
58 <example><title>{title}</title>
59 <literallayout class="monospaced">
61 </literallayout><simpara></simpara>
65 <formalpara{id? id="{id}"}><title>{title}</title><para>
66 {title%}<literallayout{id? id="{id}"}>
67 {title#}<literallayout>
70 {title#}</para></formalpara>
71 {title%}<simpara></simpara>
72 endif::doctype-manpage[]
73 endif::stgit-asciidoc-no-roff[]
74 endif::backend-docbook[]
76 ifdef::doctype-manpage[]
77 ifdef::backend-docbook[]
79 template::[header-declarations]
82 <refentrytitle>{mantitle}</refentrytitle>
83 <manvolnum>{manvolnum}</manvolnum>
84 <refmiscinfo class="source">{mansource}</refmiscinfo>
85 <refmiscinfo class="version">{manversion}</refmiscinfo>
86 <refmiscinfo class="manual">{manmanual}</refmiscinfo>
89 <refname>{manname}</refname>
90 <refpurpose>{manpurpose}</refpurpose>
92 endif::backend-docbook[]
93 endif::doctype-manpage[]
95 ifdef::backend-xhtml11,backend-html5[]
97 git-relative-html-prefix=
99 # <a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
100 <a href="https://git-scm.com/docs/{target}">{target}{0?({0})}</a>
101 endif::backend-xhtml11,backend-html5[]
105 # Usage: linkman:command[manpage-section]
107 # Note, {0} is the manpage section, while {target} is the command.
109 # Show link as: <command>(<section>); if section is defined, else just
112 ifdef::backend-docbook[]
113 [linkman-inlinemacro]
116 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
118 endif::backend-docbook[]
120 ifdef::backend-xhtml11,backend-html5[]
121 [linkman-inlinemacro]
122 <a href="{target}.html">{target}{0?({0})}</a>
123 endif::backend-xhtml11,backend-html5[]
127 # Usage: linkstg:command[]
129 # Show StGit link as: stg-<command>(1) in man pages, stg <command> in
132 ifdef::backend-docbook[]
133 [linkstg-inlinemacro]
135 <refentrytitle>stg-{target}</refentrytitle><manvolnum>1</manvolnum>
137 endif::backend-docbook[]
139 ifdef::backend-xhtml11,backend-html5[]
140 [linkstg-inlinemacro]
141 <a href="stg-{target}.html">stg {target}</a>
142 endif::backend-xhtml11,backend-html5[]
146 # Usage: linkstgsub:command[]
148 # Show StGit link as: <command>.
150 ifdef::backend-docbook[]
151 [linkstgsub-inlinemacro]
153 endif::backend-docbook[]
155 ifdef::backend-xhtml11,backend-html5[]
156 [linkstgsub-inlinemacro]
157 <a href="stg-{target}.html">{target}</a>
158 endif::backend-xhtml11,backend-html5[]