summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@lshift.net>2010-03-23 17:44:20 +0000
committerSimon MacMullen <simon@lshift.net>2010-03-23 17:44:20 +0000
commit94e415335ba30ab4eb1854605bab2eb768ad4c26 (patch)
tree1ab4998a62e717351b118bc1ba638265a2aeae19
parent39ffd7ea9cf8b66579c22116b7f390c4324ba575 (diff)
downloadrabbitmq-server-bug22554.tar.gz
Handle multiline examples in man pages separately.bug22554
-rw-r--r--Makefile2
-rw-r--r--docs/examples-to-end.xsl13
-rw-r--r--docs/rabbitmq.conf.5.xml12
3 files changed, 19 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 93c69e7f..5dae522c 100644
--- a/Makefile
+++ b/Makefile
@@ -199,7 +199,7 @@ distclean: clean
# xmlto can not read from standard input, so we mess with a tmp file.
%.gz: %.xml docs/examples-to-end.xsl
xsltproc docs/examples-to-end.xsl $< > $<.tmp && \
- xmlto man -o docs $<.tmp && \
+ xmlto man -o docs --stringparam man.indent.verbatims=0 $<.tmp && \
gzip -f docs/`basename $< .xml`
rm -f $<.tmp
diff --git a/docs/examples-to-end.xsl b/docs/examples-to-end.xsl
index b63ffcb3..496fcc1c 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 dcb1e49c..34f20f92 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