从一个图中删除标题

时间:2013-12-08 09:11:41

标签: figure caption docbook

当Docbook创建数字时,它会根据数字标题添加标题。我有意删除一个数字的标题(同时留下剩下的数字标题)。

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

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

省略title元素会导致验证错误:

$ ./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

Docbook figure元素似乎没有用于禁止生成标题的属性(请参阅http://www.docbook.org/tdg/en/html/figure.html)。

如何省略特定数字上的标题?

1 个答案:

答案 0 :(得分:3)

使用informalfigure代替figureinformalfigure只是一个没有标题的数字。