AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML テクニック

フロート

トップ
基本・一般
AH Formatter について
XSL Formatter について
操作方法
プログラミング
XSLT/XSL-FO/SVG/MathML 仕様について
XSLT/XSL-FO/MathML テクニック
索引
Q.  side-floatを使用して、ドロップキャップを行っていますが、余分な空白ができてしまいます。どうすればよいですか。 [No.2002093012]
A. 

例を挙げて説明します。 次のFOではこのような問題が起きます。

<fo:block font-size="8pt">
<fo:float float="start">
<fo:block>
<fo:inline font-size="30pt">H</fo:inline>
</fo:block>
</fo:float>ere, we have a drop cap that should be 3-lines high.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
</fo:block>

上記のFOを修正してみました。

<fo:block font-size="8pt">
<fo:float float="start">
<fo:block space-after="-8pt" space-after.conditionality="retain">
<fo:inline font-size="30pt">H</fo:inline>
</fo:block>
</fo:float>ere, we have a drop cap that should be 3-lines high.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
Now is the time for all good men.
</fo:block>

ポイントは space-after="-8pt" で、これはfloatの中のBlockオブジェクトの空白の後ろを削除するものです。 そして、space-after.conditionality="retain" はspace-afterに指定して、referenceエリアのafter-edgeに有効なのです。
なお、space-before/after というのはreferenceエリアのbefore/after-edgeで無視されます。なぜならばspace-before/after-conditionalityのデフォルト値は"discard"(無視)だからです。


Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.