Login  Register

Docbook figures with notes or legend

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Docbook figures with notes or legend

rockyallen
This is valid docbook, and in PDF correctly prints the legend between the  image and the title:

<figure>
<title>Beetle</title>
<mediaobject>
<imageobject>
<imagedata fileref="beetle.jpg"/>
</imageobject>
</mediaobject>
<para>Legend here</para>
</figure>

"Legend" can be a table or list as well as paragraph.
I can create it with an ugly passthrough, but is there a proper asciidoc way?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Docbook figures with notes or legend

mojavelinux
Administrator
You'd need to customize the DocBook converter to generate the hand-crafted DocBook you want. Once you are in the converter, you can pull content from anywhere you want so that you can "escape" from the implicit AsciiDoc structure. For instance, you could pull the legend from a separate file, or a separate area of the document.

The quickest way to customize the converter is to use the template-based converter. We have a full set of templates for the DocBook converter to give you a starting point:


You only need to include the templates you want to customize in the template folder. If a template file is missing, it will fallback to the internal converter for that node in the tree.

Once you've setup the directory, you pass it to Asciidoctor using:

 $ asciidoctor -T /path/to/custom/templates document.adoc

You can also create a custom converter in Ruby (and eventually Java once we get it integrated into AsciidoctorJ).

Cheers,

-Dan

On Thu, Dec 18, 2014 at 3:17 PM, rockyallen [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is valid docbook, and in PDF correctly prints the legend between the  image and the title:

<figure>
<title>Beetle</title>
<mediaobject>
<imageobject>
<imagedata fileref="beetle.jpg"/>
</imageobject>
</mediaobject>
<para>Legend here</para>
</figure>

"Legend" can be a table or list as well as paragraph.
I can create it with an ugly passthrough, but is there a proper asciidoc way?



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Docbook-figures-with-notes-or-legend-tp2567.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Docbook figures with notes or legend

rockyallen
Thanks. Time to learn slim...