As Laurent mentioned, you can use an inline image macro in a normal table
cell. The same goes for any inline AsciiDoc syntax. If you want to use
block-level content, such as a block image, you must add the "a" spec to
the table cell, which treats it as a standalone AsciiDoc document.

In your example, you'd write:

[source,asciidoc]
----

.Test Table
[options="header"]
|====
| Description | Model | Picture
| Widget1| the best widget ever *a*|
image::../../images/widgets/widget1.png[Diagram,role=center]
| Widget2| the next best widget |
|====

----

To make tables easier to read, I recommend putting each cell on its own
line and spacing rows by a blank line:

[source,asciidoc]
----

.Test Table
[options="header"]
|====
| Description
| Model
| Picture

| Widget1
| the best widget ever
a| image::../../images/widgets/widget1.png[Diagram,role=center]

| Widget2
| the next best widget
|
|====


----

You might also want to make use of imagesdir to avoid hardcoding the path
to the image in the AsciiDoc content:

[source,asciidoc]
----

:imagesdir: ../../images

// <fold>

a| image::widgets/widget1.png[Diagram,role="center"]

// <fold>

----

Cheers,

-Dan


On Tue, Jul 1, 2014 at 8:56 AM, Laurent Laville <[email protected]>
wrote:

> Hello,
>
> Try to use the image inline macro => image:<target>[]  rather than image
> block => image::<target>[], it should work better !
>
> Laurent
>
>
> 2014-07-01 16:12 GMT+02:00 cpama <[email protected]>:
>
> Hi there.
>> I'm just new to ascii doc and i'm trying to figure out how i can add an
>> image to a table.
>> I have the following "code" so far...
>>
>> .Test Table
>>  [options="header"]
>>  |==============================
>>  | Description | Model | Picture
>>  | Widget1| the best widget ever |
>> image::../../images/widgets/widget1.png[Diagram,role=center]
>>  | Widget2| the next best widget |
>>  |==============================
>>
>> When I convert this to an html book and then view it in a browser, the
>> image does not show up.
>> Any suggestions?
>> Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "asciidoc" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/asciidoc.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/asciidoc.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Dan Allen | http://google.com/profiles/dan.j.allen

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to