Images in example blocks, figure vs. mediaobject

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

Images in example blocks, figure vs. mediaobject

meddington
I'm using asciidoctor to target docbook 4.5 and currently working through a list of DTD failures. The only one I'm stuck on is using an image inside of an example block.  Currently asciidoctor is generating a figure element inside of the example block which is not valid docbook xml.  Docbook supports mediaobject, but not figure inside of example.

Is there a workaround for this?

Example:

.Cool Example
============
Blah blah blah

image::fun.png["Fun Image"]

============
Reply | Threaded
Open this post in threaded view
|

Re: Images in example blocks, figure vs. mediaobject

LightGuardjp
First question would be are you sure you're using the 4.5 output and not the 5.0 DocBook output? If so, I'd say this is a bug. If you have any other DTD errors please add those to the issue too. 

Sent from Mailbox for iPhone


On Thu, Mar 27, 2014 at 5:43 PM, meddington [via Asciidoctor :: Discussion] <[hidden email]> wrote:

I'm using asciidoctor to target docbook 4.5 and currently working through a list of DTD failures. The only one I'm stuck on is using an image inside of an example block.  Currently asciidoctor is generating a figure element inside of the example block which is not valid docbook xml.  Docbook supports mediaobject, but not figure inside of example.

Is there a workaround for this?

Example:

.Cool Example
============
Blah blah blah

image::fun.png["Fun Image"]

============



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Images-in-example-blocks-figure-vs-mediaobject-tp1648.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
|

Re: Images in example blocks, figure vs. mediaobject

meddington
Yes, as stated in the post I'm using docbook 4.5 output. This occurs with the stable release and also head with 4.5 output forced (I believe the default just changed).

There are some other issues, like:

image::mypng.png["Blah"]

generates invalid xml unless you include a figure title:

.My image
image::mypng.png["..."]

I will create an issue. It would be nice to have validation performed automatically, as I have run into a number of "valid" asciidoc syntax that results in bad docbook xml. Preferably, the backend would know about common syntax restrictions. This is true both for asciidoc and asciidoctor, though they differ in what invalid xml they produce. Certainly moving between the two is not easy when you move past short simple documents.

Cheers,
Mike



On Thu, Mar 27, 2014 at 4:48 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
First question would be are you sure you're using the 4.5 output and not the 5.0 DocBook output? If so, I'd say this is a bug. If you have any other DTD errors please add those to the issue too. 

Sent from Mailbox for iPhone


On Thu, Mar 27, 2014 at 5:43 PM, meddington [via Asciidoctor :: Discussion] <[hidden email]> wrote:

I'm using asciidoctor to target docbook 4.5 and currently working through a list of DTD failures. The only one I'm stuck on is using an image inside of an example block.  Currently asciidoctor is generating a figure element inside of the example block which is not valid docbook xml.  Docbook supports mediaobject, but not figure inside of example.

Is there a workaround for this?

Example:

.Cool Example
============
Blah blah blah

image::fun.png["Fun Image"]

============



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Images-in-example-blocks-figure-vs-mediaobject-tp1648.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Images-in-example-blocks-figure-vs-mediaobject-tp1648p1649.html
To unsubscribe from Images in example blocks, figure vs. mediaobject, click here.
NAML