I've scanned a lot of posts here and manuals as well... but so far no joy.
I'm running Asciidoctor 1.5.2 / asciidoc 8.6.8 under cygwin in Windows. I want centred images and centred, autonumbered titles beneath. From what I read it should be possible. My adoc source is: [[metadata_governance]] .Governance Meta-data image:images/metadata_governance.png[align="center"] The result in HTML is a left-aligned image with the title text, left-aligned above. I don't know how to get auto-numbering - ideally I want: "Figure N: <title>". To do the latter I believe I need [caption="xxx"] in some way as per here? Is this possible? Are there either document attributes or asciidoctor cmd line options needed here? thanks in advance. |
Administrator
|
In order to get an auto-numbered title with caption (e.g., Figure N. Title), you need to use the block image macro. The block image macro (like all block macros) uses two colons instead of one. [[metadata_governance]] .Governance Meta-data image::images/metadata_governance.png[align="center"] That will center the image as well. The alignment of the title is controlled by the theme. In the default theme, we align the title to the left. If you want different behavior, you need to supply additional CSS (for instance, via docinfo). For more information, and to share your use case, please refer to this open issue on the topic: https://github.com/asciidoctor/asciidoctor/issues/857 Cheers, -Dan On Wed, Jun 17, 2015 at 12:26 PM, wolandscat [via Asciidoctor :: Discussion] <[hidden email]> wrote: I've scanned a lot of posts here and manuals as well... but so far no joy. Dan Allen | http://google.com/profiles/dan.j.allen |
Thanks - that got me halfway there (centred images + autonumbred Figures). I see the issue posts on centred captions, so I think I can solve that in some way as well.
Final point: how to reference in surrounding text the figure, i.e. something like: As can be seen in <<xx>>, the Definitions package.... where <<xx>> is some kind of reference that resolves to 'Figure N', e.g. 'Figure 8'. I saw another thread on this but with no clear conclusion that I could see. Is this doable? |
Administrator
|
The reference works (in that it is clickable) so long as you assign an id to the image. In your case, you should be able to write: As can be seen in <<metadata_governance>>. As of right now, it will only show the title, Governance Meta-data, but not the caption "Figure N". That's being discussed in the following issue: Cheers, -Dan On Sat, Jun 20, 2015 at 2:56 AM, wolandscat [via Asciidoctor :: Discussion] <[hidden email]> wrote: Thanks - that got me halfway there (centred images + autonumbred Figures). I see the issue posts on centred captions, so I think I can solve that in some way as well. Dan Allen | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |