summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5f053ea)
raw | patch | inline | side by side (parent: 5f053ea)
author | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 5 Feb 2008 12:56:00 +0000 (13:56 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 5 Feb 2008 14:20:34 +0000 (15:20 +0100) |
This is a lot simpler and generates better manpages (with the required
documentation tools). The XSL stuff was a nightmarish adventure, anyway.
Of course this probably breaks documentation building on some systems.
documentation tools). The XSL stuff was a nightmarish adventure, anyway.
Of course this probably breaks documentation building on some systems.
Makefile | patch | blob | history | |
asciidoc.conf | patch | blob | history | |
manpage.xsl | [deleted file] | patch | blob | history |
diff --git a/Makefile b/Makefile
index 048e97a63e26e326e3cfd31b5bedf5e7c2eef4fb..c85e89244b619d3c423da9862f93429cefba063c 100644 (file)
--- a/Makefile
+++ b/Makefile
$(ASCIIDOC) $(ASCIIDOC_FLAGS) -b docbook -d manpage -aversion=$(VERSION) $<
%.1 : %.1.xml
- $(XMLTO) -m manpage.xsl man $<
+ $(XMLTO) man $<
%.5.html : %.5.txt
$(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d manpage $<
$(ASCIIDOC) $(ASCIIDOC_FLAGS) -b docbook -d manpage -aversion=$(VERSION) $<
%.5 : %.5.xml
- $(XMLTO) -m manpage.xsl man $<
+ $(XMLTO) man $<
%.html : %.txt
$(ASCIIDOC) $(ASCIIDOC_FLAGS) -b xhtml11 -d article -n $<
diff --git a/asciidoc.conf b/asciidoc.conf
index 8ad167ab4ee2c0218aa2f87f7badf34d70f80f2f..61b2d9305822bfb5c5119302fff081be9195f252 100644 (file)
--- a/asciidoc.conf
+++ b/asciidoc.conf
{0#</citerefentry>}
endif::backend-docbook[]
-ifdef::backend-docbook[]
-# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
-[listingblock]
-<example><title>{title}</title>
-<literallayout>
-|
-</literallayout>
-{title#}</example>
-endif::backend-docbook[]
-
ifdef::backend-xhtml11[]
[gitlink-inlinemacro]
<a href="{target}{0?.{0}}.html">{target}{0?({0})}</a>
<refname>{manname}</refname>
<refpurpose>{manpurpose}</refpurpose>
</refnamediv>
+
+# The following two small workarounds insert a simple paragraph after screen
+#
+
+[listingblock]
+<example><title>{title}</title>
+<screen>
+|
+</screen><simpara></simpara>
+{title#}</example>
+
+[verseblock]
+<formalpara{id? id="{id}"}><title>{title}</title><para>
+{title%}<literallayout{id? id="{id}"}>
+{title#}<literallayout>
+|
+</literallayout><simpara></simpara>
+{title#}</para></formalpara>
endif::backend-docbook[]
endif::doctype-manpage[]
diff --git a/manpage.xsl b/manpage.xsl
--- a/manpage.xsl
+++ /dev/null
@@ -1,55 +0,0 @@
-<!-- manpage.xsl: various fixups to docbook -> manpage output
- -
- - For now converts it adds a newline after preformatted text enclosed
- - in screen.
- -
- -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<xsl:template match="screen">
- <xsl:text>.sp .nf </xsl:text>
- <xsl:apply-templates/>
- <xsl:text> .fi .sp </xsl:text>
-</xsl:template>
-
-<xsl:template match="simpara">
- <xsl:variable name="content">
- <xsl:apply-templates/>
- </xsl:variable>
- <xsl:value-of select="normalize-space($content)"/>
- <xsl:text> </xsl:text>
- <xsl:text>.sp </xsl:text>
-</xsl:template>
-
-<xsl:template match="address|literallayout|programlisting|screen|synopsis">
- <!-- * Yes, address and synopsis are verbatim environments. -->
-
- <xsl:choose>
- <!-- * Check to see if this verbatim item is within a parent element that -->
- <!-- * allows mixed content. -->
- <!-- * -->
- <!-- * If it is within a mixed-content parent, then a line space is -->
- <!-- * already added before it by the mixed-block template, so we don't -->
- <!-- * need to add one here. -->
- <!-- * -->
- <!-- * If it is not within a mixed-content parent, then we need to add a -->
- <!-- * line space before it. -->
- <xsl:when test="parent::caption|parent::entry|parent::para|
- parent::td|parent::th" /> <!-- do nothing -->
- <xsl:otherwise>
- <xsl:text> </xsl:text>
- <xsl:text>.sp </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>.nf </xsl:text>
- <xsl:apply-templates/>
- <xsl:text> </xsl:text>
- <xsl:text> .fi </xsl:text>
- <!-- * if first following sibling node of this verbatim -->
- <!-- * environment is a text node, output a line of space before it -->
- <xsl:if test="following-sibling::node()[1][name(.) = '']">
- <xsl:text> </xsl:text>
- <xsl:text>.sp </xsl:text>
- </xsl:if>
-</xsl:template>
-</xsl:stylesheet>