diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2008-09-22 17:10:45 +1200 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2008-09-22 17:10:45 +1200 |
commit | 8f245d4ac1cdfa7c622b87dfb5eeff35a5967aae (patch) | |
tree | da576249906239a01b96590805a819303114e51e /docbook-xsl | |
parent | e1bbc84bcf02ba12d9406bfc0c93087ebabf9ccd (diff) | |
download | asciidoc-8f245d4ac1cdfa7c622b87dfb5eeff35a5967aae.tar.gz |
Did away with the need for the shaded-literallayout.patch (thanks to Henrik Maier for this patch).
Diffstat (limited to 'docbook-xsl')
-rw-r--r-- | docbook-xsl/asciidoc-docbook-xsl.txt | 26 | ||||
-rw-r--r-- | docbook-xsl/fo.xsl | 9 | ||||
-rw-r--r-- | docbook-xsl/shaded-literallayout.patch | 32 |
3 files changed, 7 insertions, 60 deletions
diff --git a/docbook-xsl/asciidoc-docbook-xsl.txt b/docbook-xsl/asciidoc-docbook-xsl.txt index 7cacb90..bd1f850 100644 --- a/docbook-xsl/asciidoc-docbook-xsl.txt +++ b/docbook-xsl/asciidoc-docbook-xsl.txt @@ -43,29 +43,3 @@ wait for the Debian `docbook-xsl` package: $ sudo vi docbook-xsl.xml - Apply optional patches (see below). - - -Patches to DocBook XSL Stylesheets ----------------------------------- -NOTE: You'll find the patch files in the AsciiDoc distribution archive -`./docbook-xsl/` directory. - -Shade Literal Block Patch -~~~~~~~~~~~~~~~~~~~~~~~~~ -The processing expectation for AsciiDoc LiteralBlocks and -LiteralParagraphs is that they are not shaded. The -`shaded-literallayout.patch` was devised to allow AciiDoc Listing -blocks to be shaded while leaving Literal paragraphs and Literal -blocks unshaded (the default DocBook XSL Stylesheets behavior is to -shade all verbatim elements). - -The patch implements a `shade.literallayout` XSL parameter so that -shading in literal elements could be disabled while other verbatim -elements are left shaded (by setting the XSL `shade.verbatim` -parameter). - -The relevant patch file is `shaded-literallayout.patch` and it can be -applied from the DocBook XSL Stylesheets directory: - - $ cd /usr/share/xml/docbook/stylesheet/docbook-xsl-1.72.0 - $ sudo patch -p0 < /tmp/shaded-literallayout.patch diff --git a/docbook-xsl/fo.xsl b/docbook-xsl/fo.xsl index f164580..b1f7238 100644 --- a/docbook-xsl/fo.xsl +++ b/docbook-xsl/fo.xsl @@ -127,10 +127,15 @@ <xsl:param name="callout.graphics" select="'1'"/> -<xsl:param name="shade.literallayout" select="0"/> +<!-- Only shade programlisting and screen verbatim elements--> <xsl:param name="shade.verbatim" select="1"/> <xsl:attribute-set name="shade.verbatim.style"> - <xsl:attribute name="background-color">#F0F0F0</xsl:attribute> + <xsl:attribute name="background-color"> + <xsl:choose> + <xsl:when test="self::programlisting|self::screen">#E0E0E0</xsl:when> + <xsl:otherwise>inherit</xsl:otherwise> + </xsl:choose> + </xsl:attribute> </xsl:attribute-set> </xsl:stylesheet> diff --git a/docbook-xsl/shaded-literallayout.patch b/docbook-xsl/shaded-literallayout.patch deleted file mode 100644 index e88ff98..0000000 --- a/docbook-xsl/shaded-literallayout.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -u fo.ORIG/param.xsl fo/param.xsl ---- fo.ORIG/param.xsl 2005-11-30 19:22:15.992409173 +1300 -+++ fo/param.xsl 2005-11-30 11:25:40.000000000 +1300 -@@ -669,6 +669,7 @@ - </xsl:attribute-set> - <xsl:param name="segmentedlist.as.table" select="0"/> - <xsl:param name="shade.verbatim" select="0"/> -+<xsl:param name="shade.literallayout" select="0"/> - - <xsl:attribute-set name="shade.verbatim.style"> - <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> -diff -u fo.ORIG/verbatim.xsl fo/verbatim.xsl ---- fo.ORIG/verbatim.xsl 2005-11-30 19:22:15.944415115 +1300 -+++ fo/verbatim.xsl 2005-11-30 11:26:12.000000000 +1300 -@@ -105,7 +105,7 @@ - <xsl:choose> - <xsl:when test="@class='monospaced'"> - <xsl:choose> -- <xsl:when test="$shade.verbatim != 0"> -+ <xsl:when test="$shade.literallayout != 0"> - <fo:block id="{$id}" - white-space-collapse='false' - white-space-treatment='preserve' -@@ -128,7 +128,7 @@ - </xsl:when> - <xsl:otherwise> - <xsl:choose> -- <xsl:when test="$shade.verbatim != 0"> -+ <xsl:when test="$shade.literallayout != 0"> - <fo:block id="{$id}" - wrap-option='no-wrap' - white-space-collapse='false' |