Remove Caption from one Figure

430 views Asked by At

When Docbook creates figures, its adds a caption based on the figure's title. I'm interested in removing the caption of one figure (while leaving the remaining figure captions in place).

<figure floatstyle="right" id="figure-name">
  <title>Figure Caption</title>

  <mediaobject>
    <imageobject>
      <imagedata fileref="images/image-1.png" scale="70"/>
    </imageobject>
  </mediaobject>
</figure>

Omitting the title element cause a validation error:

$ ./make-book.sh 
chapter-5.xml:11: element figure: validity error : Element figure content does not follow the 
DTD, expecting (blockinfo? , (title , titleabbrev?) , (literallayout | programlisting | 
programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis |  
classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | 
address | blockquote | graphic | graphicco | mediaobject | mediaobjectco | informalequation | 
informalexample | informalfigure | informaltable | indexterm | beginpage | link | olink | 
ulink)+), got (mediaobject )
Document book.xml does not validate

The Docbook figure element does not appear to have an attribute to suppress the generation of the caption (see http://www.docbook.org/tdg/en/html/figure.html).

How does one omit the caption on a particular figure?

1

There are 1 answers

0
mzjn On BEST ANSWER

Use informalfigure instead of figure. An informalfigure is simply a figure without a title.