khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Images as a figure with a caption in DocBook #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Pandoc 1.6 exports images in DocBook very strange. The captions are set wrong. 
I have to use:

cat text.db | sed -e 's/<inlinemediaobject>/<figure>/g' -e
's/<imageobject>//g' -e 's/<objectinfo>//g' -e
's/<\/objectinfo>/<mediaobject><imageobject>/g' -e
's/<\/inlinemediaobject>/<\/mediaobject><\/figure>/g'  > text.db

The OBJECTINFO element seems to be worthless and the included title
will be never shown:
http://www.docbook.org/tdg/en/html/objectinfo.html

The way to include an image with caption correctly is described here:
http://www.ibiblio.org/godoy/sgml/docbook/howto/using-docbook.html#INSERTING-PIC
TURES

Original issue reported on code.google.com by schm...@gmx.de on 10 Nov 2010 at 5:04

GoogleCodeExporter commented 9 years ago
I can't reproduce this.  I don't get anything with <objectinfo>.  Pandoc gives 
me:

% pandoc -t docbook
![caption](my.jpg)

<figure>
  <title>caption</title>
  <mediaobject>
    <imageobject>
      <imagedata fileref="my.jpg" />
    </imageobject>
    <textobject><phrase>caption</phrase></textobject>
  </mediaobject>
</figure>

That seems almost identical to the second example you referenced (except no 
<caption> tag).  Would it be better to output something like:

    <figure>
       <title>Picture's Title</title>
       <graphic fileref="images/file"></graphic>
    </figure>

I can't remember whether I looked into that option.

Original comment by fiddloso...@gmail.com on 23 Nov 2010 at 11:02

GoogleCodeExporter commented 9 years ago
Issue 267 has been merged into this issue.

Original comment by fiddloso...@gmail.com on 24 Nov 2010 at 3:39

GoogleCodeExporter commented 9 years ago
I don't know what I drank or what kind of drugs my server buys if I am away.
Yes, there is no bug. The images are fine. Sorry.

Original comment by schm...@gmx.de on 25 Nov 2010 at 3:49

GoogleCodeExporter commented 9 years ago

Original comment by fiddloso...@gmail.com on 8 Dec 2010 at 8:06