'"asciidoctor-fopub" hello world
Since asciidoctor-pdf has some limitations I would like to use asciidoctor-fopub to generate a pdf with footnotes on each page and pictures floating in the text ...
And the title of the first chapter of the documentation of asciidoctor-fopub is promising, it states: "doing-is-believing" ... I thus tried the step by step example and did:
mkdir fopub
curl --progress-bar -L https://api.github.com/repos/asciidoctor/asciidoctor-fopub/tarball | tar xzf - -C fopub/ --str
ip-components=1
cd fopub
echo "= Document Title" > sample.adoc
echo "Doc Writer <[email protected]>" >> sample.adoc
echo "" >> sample.adoc
echo "A sample http://asciidoc.org[AsciiDoc] document." >> sample.adoc
echo "" >> sample.adoc
echo "== Introduction" >> sample.adoc
echo "" >> sample.adoc
echo "Hello fopub !" >> sample.adoc
time docker run --rm -v ${PWD#"/cygdrive"}:/documents/ asciidoctor/docker-asciidoctor asciidoctor -b docbook -d book -a data-uri! sample.adoc
$ cat sample.xml
<?xml version="1.0" encoding="UTF-8"?>
<?asciidoc-toc?>
<?asciidoc-numbered?>
<book xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
<info>
<title>Document Title</title>
<date>2022-02-02</date>
<author>
<personname>
<firstname>Doc</firstname>
<surname>Writer</surname>
</personname>
<email>[email protected]</email>
</author>
<authorinitials>DW</authorinitials>
</info>
<preface>
<title></title>
<simpara>A sample <link xl:href="http://asciidoc.org">AsciiDoc</link> document.</simpara>
</preface>
<chapter xml:id="_introduction">
<title>Introduction</title>
<simpara>Hello fopub !</simpara>
</chapter>
</book>
It should be now time to believe, but what did append rather left me with a doubt:
$ ./fopub sample.xml
fÚvr. 02, 2022 11:21:40 PM org.apache.fop.cli.InputHandler error
GRAVE: javax.xml.transform.TransformerException: Exception d'E-S avec le fichier de la feuille de style : https://cdn.docbook.org/release/xsl/current/fo/docbook.xsl
fÚvr. 02, 2022 11:21:40 PM org.apache.fop.cli.Main startFOP
GRAVE: Exception
org.apache.fop.apps.FOPException: javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: Impossible de trouver la variable portant le nom title.margin.left
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: Impossible de trouver la variable portant le nom title.margin.left
(...)
; SystemID: file:///D:/brl/proj/2022/fopub/./build/fopub/docbook-xsl/fo-pdf.xsl; Line#: 247; Column#: 82
; SystemID: file:///D:/brl/proj/2022/fopub/./build/fopub/docbook-xsl/fo-pdf.xsl; Line#: 247; Column#: 82
javax.xml.transform.TransformerException: Impossible de trouver la variable portant le nom title.margin.left
at org.apache.xpath.operations.Variable.fixupVariables(Variable.java:144)
at org.apache.xpath.XPath.fixupVariables(XPath.java:86)
Would any one know how to get asciidoctor-fopub to work ?
Here is my configuration: $ java -version java version "1.8.0_92" Java(TM) SE Runtime Environment (build 1.8.0_92-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode) uname -a CYGWIN_NT-10.0 DESKTOP-MY 3.3.3(0.341/5/3) 2021-12-03 16:35 x86_64 Cygwin
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
