blob: 7afcf6f51495b6bd920f4b1643f26284d53cd060 [file] [log] [blame]
[attributes]
asterisk=*
plus=+
caret=^
startsb=[
endsb=]
tilde=~
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[]
&#10;.ft C&#10;
endif::doctype-manpage[]
|
ifdef::doctype-manpage[]
&#10;.ft&#10;
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[]
## linkman: macro
#
# Usage: linkman: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[]
[linkman-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
{0#</citerefentry>}
endif::backend-docbook[]
ifdef::backend-xhtml11[]
[linkman-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
## linkstg: macro
#
# Usage: linkstg:command[]
#
# Show StGit link as: stg-<command>(1) in man pages, stg <command> in
# html.
ifdef::backend-docbook[]
[linkstg-inlinemacro]
<citerefentry>
<refentrytitle>stg-{target}</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>
endif::backend-docbook[]
ifdef::backend-xhtml11[]
[linkstg-inlinemacro]
<a href="stg-{target}.html">stg {target}</a>
endif::backend-xhtml11[]
## linkstgsub: macro
#
# Usage: linkstgsub:command[]
#
# Show StGit link as: <command>.
ifdef::backend-docbook[]
[linkstgsub-inlinemacro]
{target}
endif::backend-docbook[]
ifdef::backend-xhtml11[]
[linkstgsub-inlinemacro]
<a href="stg-{target}.html">{target}</a>
endif::backend-xhtml11[]
[macros]
# regexen to match macro templates above
(?P<name>linkman):(?P<target>\w+)\[(?P<attrlist>\d+)]=
(?P<name>linkstgsub):(?P<target>\w+)\[]=
(?P<name>linkstg):(?P<target>\w+)\[]=