summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/examples-to-end.xsl13
-rw-r--r--docs/rabbitmq.conf.5.xml12
-rw-r--r--docs/rabbitmqctl.1.xml4
-rw-r--r--docs/usage.xsl10
4 files changed, 24 insertions, 15 deletions
diff --git a/docs/examples-to-end.xsl b/docs/examples-to-end.xsl
index b63ffcb3c9..496fcc1c34 100644
--- a/docs/examples-to-end.xsl
+++ b/docs/examples-to-end.xsl
@@ -8,7 +8,7 @@
<xsl:output doctype-public="-//OASIS//DTD DocBook XML V4.5//EN" doctype-system="http://www.docbook.org/xml/4.5/docbookx.dtd" />
-<!-- Don't copy exmaples through in place -->
+<!-- Don't copy examples through in place -->
<xsl:template match="*[@role='example-prefix']"/>
<xsl:template match="*[@role='example']"/>
@@ -25,6 +25,7 @@
</xsl:for-each>
<refsect1>
<title>Examples</title>
+<xsl:if test="//screen[@role='example']">
<variablelist>
<xsl:for-each select="//screen[@role='example']">
<varlistentry>
@@ -35,6 +36,16 @@
</varlistentry>
</xsl:for-each>
</variablelist>
+</xsl:if>
+<!--
+We need to handle multiline examples separately, since not using a
+variablelist leads to slightly less nice formatting (the explanation doesn't get
+indented)
+-->
+<xsl:for-each select="//screen[@role='example-multiline']">
+<screen><emphasis role="bold"><xsl:copy-of select="text()"/></emphasis></screen>
+<xsl:copy-of select="following-sibling::para[@role='example']"/>
+</xsl:for-each>
</refsect1>
</refentry>
</xsl:template>
diff --git a/docs/rabbitmq.conf.5.xml b/docs/rabbitmq.conf.5.xml
index dcb1e49c68..34f20f9226 100644
--- a/docs/rabbitmq.conf.5.xml
+++ b/docs/rabbitmq.conf.5.xml
@@ -9,7 +9,7 @@
</refentryinfo>
<refmeta>
- <refentrytitle>/etc/rabbitmq/rabbitmq.conf</refentrytitle>
+ <refentrytitle>rabbitmq.conf</refentrytitle>
<manvolnum>5</manvolnum>
<refmiscinfo class="manual">RabbitMQ Server</refmiscinfo>
</refmeta>
@@ -59,11 +59,11 @@ environment variable names, with the <envar>RABBITMQ_</envar> prefix removed:
<filename>/etc/rabbitmq/rabbitmq.conf</filename> file, etc.
</para>
<para role="example-prefix">For example:</para>
- <screen role="example">
- # I am a complete /etc/rabbitmq/rabbitmq.conf file.
- # Comment lines start with a hash character.
- # This is a /bin/sh script file - use ordinary envt var syntax
- NODENAME=hare
+ <screen role="example-multiline">
+# I am a complete /etc/rabbitmq/rabbitmq.conf file.
+# Comment lines start with a hash character.
+# This is a /bin/sh script file - use ordinary envt var syntax
+NODENAME=hare
</screen>
<para role="example">
This is an example of a complete
diff --git a/docs/rabbitmqctl.1.xml b/docs/rabbitmqctl.1.xml
index e7fc45e4ba..7634b2d247 100644
--- a/docs/rabbitmqctl.1.xml
+++ b/docs/rabbitmqctl.1.xml
@@ -65,7 +65,7 @@
<title>Options</title>
<variablelist>
<varlistentry>
- <term><option>-n</option> <replaceable>node</replaceable></term>
+ <term><cmdsynopsis><arg choice="opt">-n <replaceable>node</replaceable></arg></cmdsynopsis></term>
<listitem>
<para role="usage">
Default node is "rabbit@server", where server is the local host. On
@@ -79,7 +79,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-q</option></term>
+ <term><cmdsynopsis><arg choice="opt">-q</arg></cmdsynopsis></term>
<listitem>
<para role="usage">
Quiet output mode is selected with the "-q" flag. Informational
diff --git a/docs/usage.xsl b/docs/usage.xsl
index 841b2a8461..72f8880ab1 100644
--- a/docs/usage.xsl
+++ b/docs/usage.xsl
@@ -12,19 +12,17 @@
encoding="UTF-8"
indent="no"/>
<xsl:strip-space elements="*"/>
-<xsl:preserve-space elements="term" />
+<xsl:preserve-space elements="cmdsynopsis arg" />
<xsl:template match="/">
<!-- Pull out cmdsynopsis to show the command usage line. -->%% Generated, do not edit!
-module(<xsl:value-of select="$modulename" />).
-export([usage/0]).
-usage() -> io:format(%QUOTE%Usage:
+usage() -> %QUOTE%Usage:
<xsl:value-of select="refentry/refsynopsisdiv/cmdsynopsis/command"/>
<xsl:text> </xsl:text>
<xsl:for-each select="refentry/refsynopsisdiv/cmdsynopsis/arg">
- <xsl:if test="@choice='opt'">[</xsl:if>
<xsl:apply-templates select="." />
- <xsl:if test="@choice='opt'">]</xsl:if>
<xsl:text> </xsl:text>
</xsl:for-each>
@@ -60,7 +58,7 @@ usage() -> io:format(%QUOTE%Usage:
</xsl:for-each>
<xsl:apply-templates select=".//*[title='Commands']/refsect2" mode="command-usage" />
-%QUOTE%), halt(1).
+%QUOTE%.
</xsl:template>
<!-- Option lists in command usage -->
@@ -74,7 +72,7 @@ usage() -> io:format(%QUOTE%Usage:
<!-- Don't show anything else in command usage -->
<xsl:template match="text()" mode="command-usage"/>
-<xsl:template match="option">[<xsl:apply-templates/>]</xsl:template>
+<xsl:template match="arg[@choice='opt']">[<xsl:apply-templates/>]</xsl:template>
<xsl:template match="replaceable">&lt;<xsl:value-of select="."/>&gt;</xsl:template>
</xsl:stylesheet>