asciidoc-* tags and dblatex (proposed changes)

Skip to first unread message

Mark Fernandes

Jul 3, 2009, 4:36:18 PM7/3/09
Hi Stuart,

I like the new 'asciidoc-*' tags because they permit extending
AsciiDoc while maintaining consistency with DocBook and avoid
confusion because they are readily understood as being
AsciiDoc specific.

Since I use dblatex, instead of FOP, to generate pdf, I discovered
the <asciidoc-*> tags by themselves cause problems that do not go away
unless wrapped inside <simpara> </simpara> tags.

In future, I think it might be a good idea to wrap any '<asciidoc-*>'
tags within '<simpara>...</simpara>' tags, otherwise the
processing-instruction does not work in dblatex (I am using the latest
released version of dblatex 0.2.11)

Thank you for all the work you do on AsciiDoc, and I hope you accept
this contribution (under any license you choose). I have not checked
these changes with FOP so I do not know whether they work or not.

Mark Fernandes.

Here are my suggested changes to the two files: docbook.conf and

Changes in docbook.conf

# Uses a custom processing instruction in asciidoc-dblatex.xsl.

# Uses a custom processing instruction in asciidoc-dblatex.xsl.

Additions to dblatex/asciidoc-dblatex.xsl

<xsl:template match="processing-instruction('asciidoc-pagebreak')">
<!-- force hard pagebreak, varies from 0(low) to 4(high) -->
<xsl:text>\pagebreak[4] </xsl:text>
<xsl:apply-templates />

<xsl:template match="processing-instruction('asciidoc-br')">

<xsl:template match="processing-instruction('asciidoc-hr')">
<!-- draw a 444 pt line (centered) -->
<xsl:text>\begin{center}&#10; </xsl:text>
<xsl:text>\line(1,0){444}&#10; </xsl:text>
<xsl:text>\end{center}&#10; </xsl:text>

Stuart Rackham

Jul 5, 2009, 8:45:57 PM7/5/09
Hi Mark

Thank you for this patch, it works really well (I'm on dblatex 0.2.9)
and was sorely needed. The simpara tags don't seem to affect the FOP

Have added it to the trunk:

Cheers, Stuart
Reply all
Reply to author
0 new messages