Open rahmanusta opened 10 years ago
You have to hack the XSL (either fo-pdf.xsl or common.xsl in src/dist/docbook-xsl/). Here's the reference from sagehill.
http://www.sagehill.net/docbookxsl/FormalTitles.html
fopub offers a set of XSL refinements to make the output look a bit better and deal with some AsciiDoc-specific content, but doesn't offer a general framework for changing core functionality in the DocBook toolchain. Those are left up to the user as an exercise :)
Thanks Dan, i know. However, i couldnt enable figure numbering, can you help me for this? :)
Does the figure have a title? Is it a block-level image (two colons?). It might be helpful if you give me either the source AsciiDoc or the relative bits of the DocBook XML.
When I run fopub
on the README.adoc for this repository, I'm seeing a figure number. Do you get the same result?
I've found the reason. I'm using asciidoctor.js to generate docbook from asciidoctor. But, it renders image in formaldata element instead of figure.
For example, it was so
<formalpara>
<title>Sample PDF document rendered in viewer</title>
<para><inlinemediaobject>
<imageobject>
<imagedata fileref="images/image001.png"/>
</imageobject>
<textobject><phrase>Screenshot of sample PDF document</phrase></textobject>
</inlinemediaobject></para>
</formalpara>
When after changed formalpara elements to figure, it shows the figure numbering.
Which version of Asciidoctor.js do you have that supports the DocBook backend? I didn't realize we compiled that into Asciidoctor.js anywhere. Do you use custom templates?
No, i didnt use custom template. Yes, it is older version but there is no version comment on top of js file. it is older but converts asciidoc to docbook5.
I wasn't aware that Asciidoctor.js could convert to DocBook. Strange.
Yes, it can convert. Im using this conversation in AsciidocFX :)
I want to clear something;
Thanks @rahmanusta. The best way to proceed to resolve these issues is to provide small sample documents that we can use in a test case.
Even if you can't get the code to run, writing a cucumber test scenario in draft form is helpful. For examples, see https://github.com/asciidoctor/asciidoctor/blob/master/features/open_block.feature. I've setup multiple ways to represent the output. Just pick the form that works best for the use case.
Im using asciidoctor-fopub to generate pdf books. toc and table's numbering is generating with it. But, i couldnt generate image numbering with fopub, how can i do it?