-## gitlink: macro
-#
-# Usage: gitlink:command[manpage-section]
-#
-# Note, {0} is the manpage section, while {target} is the command.
-#
-# Show GIT link as: <command>(<section>); if section is defined, else just show
-# the command.
-
[attributes]
-caret=^
+asterisk=*
+plus=+
+caret=^
startsb=[
endsb=]
tilde=~
ifdef::backend-docbook[]
-[gitlink-inlinemacro]
-{0%{target}}
-{0#<citerefentry>}
-{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
-{0#</citerefentry>}
-endif::backend-docbook[]
-
-ifdef::backend-docbook[]
+ifndef::docbook-xsl-172[]
# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
+# v1.72 breaks with this because it replaces dots not in roff requests.
[listingblock]
<example><title>{title}</title>
<literallayout>
+ifdef::doctype-manpage[]
+ .ft C
+endif::doctype-manpage[]
|
+ifdef::doctype-manpage[]
+ .ft
+endif::doctype-manpage[]
</literallayout>
{title#}</example>
+endif::docbook-xsl-172[]
+endif::backend-docbook[]
+
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+<refmiscinfo class="source">StGit</refmiscinfo>
+<refmiscinfo class="version">{stgit_version}</refmiscinfo>
+<refmiscinfo class="manual">StGit Manual</refmiscinfo>
+</refmeta>
+<refnamediv>
+ <refname>{manname}</refname>
+ <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+## htmllink: macro
+#
+# Usage: htmllink:url[text]
+
+ifdef::backend-docbook[]
+[htmllink-inlinemacro]
+{0}
+endif::backend-docbook[]
+
+ifdef::backend-xhtml11[]
+[htmllink-inlinemacro]
+<a href="{target}">{0}</a>
+endif::backend-xhtml11[]
+
+## manlink: macro
+#
+# Usage: manlink:command[manpage-section]
+#
+# Note, {0} is the manpage section, while {target} is the command.
+#
+# Show link as: <command>(<section>); if section is defined, else just
+# show the command.
+
+ifdef::backend-docbook[]
+[manlink-inlinemacro]
+{0%{target}}
+{0#<citerefentry>}
+{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
+{0#</citerefentry>}
endif::backend-docbook[]
ifdef::backend-xhtml11[]
-[gitlink-inlinemacro]
+[manlink-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
-# stglink
+## linkstg: macro
+#
+# Usage: linkstg:command[]
+#
+# Show StGit link as: stg-<command>(1) in man pages, stg <command> in
+# html.
ifdef::backend-docbook[]
-[stglink-inlinemacro]
+[linkstg-inlinemacro]
<citerefentry>
-<refentrytitle>stg {target}</refentrytitle><manvolnum>1</manvolnum>
+ <refentrytitle>stg-{target}</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>
endif::backend-docbook[]
ifdef::backend-xhtml11[]
-[stglink-inlinemacro]
-<a href="stg-{target}.html">stg {target}(1)</a>
+[linkstg-inlinemacro]
+<a href="stg-{target}.html">stg {target}</a>
endif::backend-xhtml11[]
-# stgdesc
-[stgdesc-inlinemacro]
-{sys:../stg help|grep " {target}" | tr -s ' '| cut -d' ' -f3-}
+## linkstgsub: macro
+#
+# Usage: linkstgsub:command[]
+#
+# Show StGit link as: <command>.
-[stgdesc-blockmacro]
-stglink:{target}[]::
- stgdesc:{target}[]
+ifdef::backend-docbook[]
+[linkstgsub-inlinemacro]
+{target}
+endif::backend-docbook[]
+
+ifdef::backend-xhtml11[]
+[linkstgsub-inlinemacro]
+<a href="stg-{target}.html">{target}</a>
+endif::backend-xhtml11[]