Hello all
I am still strying to convert colors from my asciidoctor files into pdf's. See previous
thread.
I am now trying the asciidoctor-fopub route without any success so far.
I have the following basic test.adoc file:
This should be [red]#printed in red#
Which is translated into the following xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<?asciidoc-toc?>
<?asciidoc-numbered?>
<book lang="en">
<bookinfo>
<title>Untitled</title>
<date>2016-02-29</date>
</bookinfo>
<preface>
<title></title>
<simpara>This should be <phrase role="red">printed in red</phrase></simpara>
</preface>
</book>
Now I have edited the fo-pdf.xsl file in asciidoctor-fopub/build/fopub/docbook-xsl/ and I added:
...
<xsl:template match="processing-instruction('asciidoc-pagebreak')">
<fo:block break-after='page'/>
</xsl:template>
<xsl:template match="phrase[@role='red']">
<fo:inline color="red">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
...
I then run fopub text.xml but my pdf still does not show the red color.
What am I doing wrong ? I must confess I am not an xslt expert :-)
Jacques