doc/man: add asciidoc.conf
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 1 Sep 2015 14:58:25 +0000 (10:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Mar 2016 21:13:10 +0000 (17:13 -0400)
asciidoc.conf is the configuration file for AsciiDoc. It contains macros
to generate the output differently based on the backend.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
doc/man/asciidoc.conf [new file with mode: 0644]

diff --git a/doc/man/asciidoc.conf b/doc/man/asciidoc.conf
new file mode 100644 (file)
index 0000000..3f8cac4
--- /dev/null
@@ -0,0 +1,60 @@
+[macros]
+
+# linklttng macro
+#
+# Inspired by linkgit macro:
+# <https://github.com/git/git/blob/master/Documentation/asciidoc.conf>
+#
+# Usage: linklttng:command(manpage-section)
+(?su)[\\]?(?P<name>linklttng):(?P<target>\S*?)\((?P<attrlist>.*?)\)=
+
+# option macro
+#
+# Usage: option:--option-name
+(?su)[\\]?(?P<name>option):(?P<opt>--?[a-zA-Z0-9-]*)=
+
+# not macro
+#
+# Usage: :not:
+:not:=not
+
+# linklttng macro expansions
+ifdef::backend-docbook[]
+[linklttng-inlinemacro]
+{0%{target}}
+{0#<citerefentry>}
+{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
+{0#</citerefentry>}
+endif::backend-docbook[]
+
+# option macro expansions
+ifdef::backend-docbook[]
+[option-inlinemacro]
+<literal>{opt}</literal>
+endif::backend-docbook[]
+
+# not macro expansions
+ifdef::backend-docbook[]
+[not-inlinemacro]
+NOT
+endif::backend-docbook[]
+
+# configure XML man page header
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+<refmiscinfo class="source">LTTng</refmiscinfo>
+<refmiscinfo class="version">{lttng_version}</refmiscinfo>
+<refmiscinfo class="manual">LTTng Manual</refmiscinfo>
+</refmeta>
+<refnamediv>
+  <refname>{manname}</refname>
+  <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+endif::backend-docbook[]
+endif::doctype-manpage[]
This page took 0.026786 seconds and 4 git commands to generate.