Login  Register

image:: in cell of csv of table

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

image:: in cell of csv of table

willwade
So I have a table like so::

[format="csv"]
|===
include::AsciiDoctorTableofSymbols.csv[]
|===


and a row looks like this..

Arts & Crafts 54,image::Resources/arts_and_crafts_54-thumb.png,link:Resources/arts_and_crafts_54_PCS.pdf[PCS - PDF],link:Resources/arts_and_crafts_54_SS.pdf[SymbolStix - PDF],link:Resources/arts_and_crafts_54_Widgit.pdf[Widgit - PDF],link:Resources/arts_and_crafts_54.bm2[Boardmaker],link:Resources/arts_and_crafts_54_w.cip[Communicate in Print],link:Resources/arts_and_crafts_54.smd[SMD]

(preview here: http://ibooks.speechbubble.org.uk/UsingLowTechSymbolSystemsChildren/#_chapter_11_downloadable_resources)

but the image:: tag is being displayed as raw text - not as an image. I feel I'm being an idiot and not doing something blindingly obvious but can't see it!

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

Re: image:: in cell of csv of table

mojavelinux
Administrator
To use an AsciiDoc table cell (which permits block elements) in CSV content, you need to declare the cell "style" at the column level (since you can't declare it in the data itself).

[cols="1,1a"]
,===
regular cell,image::photo.png[]
,===

This is equivalent to:

[cols="1,1a"]
|===
|regular cell |image::photo.png[]
|===

or

[cols="2*"]
|===
|regular cell a|image::photo.png[]
|===

A regular cell does support an inline image (single colon). Of course, the behavior is slightly different.

[cols="2*"]
,===
regular cell,image:photo.png[]
,===

Hope that helps!

-Dan

On Thu, Dec 22, 2016 at 8:48 AM, willwade [via Asciidoctor :: Discussion] <[hidden email]> wrote:
So I have a table like so::

[format="csv"]
|===
include::AsciiDoctorTableofSymbols.csv[]
|===


and a row looks like this..

Arts & Crafts 54,image::Resources/arts_and_crafts_54-thumb.png,link:Resources/arts_and_crafts_54_PCS.pdf[PCS - PDF],link:Resources/arts_and_crafts_54_SS.pdf[SymbolStix - PDF],link:Resources/arts_and_crafts_54_Widgit.pdf[Widgit - PDF],link:Resources/arts_and_crafts_54.bm2[Boardmaker],link:Resources/arts_and_crafts_54_w.cip[Communicate in Print],link:Resources/arts_and_crafts_54.smd[SMD]

(preview here: http://ibooks.speechbubble.org.uk/UsingLowTechSymbolSystemsChildren/#_chapter_11_downloadable_resources)

but the image:: tag is being displayed as raw text - not as an image. I feel I'm being an idiot and not doing something blindingly obvious but can't see it!

thanks!


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/image-in-cell-of-csv-of-table-tp5173.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: image:: in cell of csv of table

willwade
Awesome. Thanks. As the manual says - tables are powerful!