Block Image Right and Flow Text Around It?

后端 未结 2 1301
情书的邮戳
情书的邮戳 2020-12-19 16:04

I\'m working with DockBook 4.5 and Apache FOP 1.1 on Ubuntu 13.04. The Docbook translation are provided by Ubuntu and FOP was downloaded directly from Apache.

Would

相关标签:
2条回答
  • 2020-12-19 16:36

    you need to use a formatter tnat supports fo:float.

    http://xmlgraphics.apache.org/fop/compliance.html

    For an example, it would be like this:

    <fo:float float="right">
    <fo:block text-align="center"
              border="1pt solid gray"
              font="bold italic 9pt Helvetica">
      <fo:block>
        <fo:external-graphic src="url('smile.gif')"/>
      </fo:block>
      <fo:block>
        Fig. 1: A Smiling Face
      </fo:block>
    </fo:block>
    </fo:float>
    
    0 讨论(0)
  • 2020-12-19 16:48

    This builds upon Kevin's answer. The solution is to use a Formatted Object Processor that supports the feature. Apache FOP is feature anemic in some critical areas like floating an image (unless you are Gutenberg working with a printing press).

    If you are looking for a free one, then try XEP (http://www.renderx.com/). It works as expected, and it has a free license for non-commercial projects.

    For completeness, Sagehill lists a bunch of processors at http://www.sagehill.net/docbookxsl/FOprocessors.html. I tired three of the free ones, and they are all broken. The remaining free ones no longer exist (or their web pages are broken).

    0 讨论(0)
提交回复
热议问题