Images & image titles

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

Images & image titles

rotcodiicsa
Hello,  looking this two guides
http://asciidoctor.org/docs/user-manual/#images
http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#images

.A mountain sunset
[#img-sunset]
[caption="Figure 1: ",link=http://www.flickr.com/photos/javh/5448336655]
image::sunset.jpg[Sunset,300,200]

Especially this snippet.
1.Is there a way to achieve a title under  inline image
2.How can I double the same  next to it , not under.
3.How are the block images suppose to handle "width" and "height"? There is enough space but they still take full width.

What I'm trying to do is table cell that include 3 images (with their titles) next to each other and not on new line.
Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: Images & image titles

Linda

1. Afaik, is a title/caption under an image only possible when it is included as a macro ('::') (correct me if I'm wrong/use the wrong terms).

I include my images as follows:
[[fig-nice-sunset]]
.The sunset is nice from this angle
image::sunset.png[Sunset above water, 300]

The first is explicit id, using it to refer to it elsewhere. I'm using an extention to change the figure names to 'fig' before the final format is created.  It will automatically link the title '.The sunset is nice from this angle' to an image, because the image macro is followed directly after --> same for tables and example blocks. For images it always positiopns below, tables and example blocks above. This is only helpful if you have a single line of caption. For further explanations it's not so neat (looking onto a solution, suggestions are welcome)

2. I'd use a table and use inline images (so single ':' ). With inline images they will appear next to each other, but to be sure, I place them in a table. I add text on the next line within the cell with '+':
[cols="^,^,^", width=50%]
|====
3+<s|state

|image:icon-managed.png[Managed,50] +
Managed
|image:icon-unmanaged.png[Unmanaged,50] +
Unmanaged
|image:icon-offline.png[Offline,50] +
Offline
|====

If you don't want to show the table markup, you can hide them with attributes.  frame="none" removes the borderlines, grid="none" removes the grid lines.  

3. It seems you don't have to mention the attribute names themselves to have it work.

HTH
Reply | Threaded
Open this post in threaded view
|

Re: Images & image titles

rotcodiicsa
Thank you. This is what I try to achieve:
asciidoctor.jpg

I'm now trying to do it with _nested_ tables without success.

Images and titles are positioned left - not centered.
Table borders can't be hidden.
(I'm using gitbook)