XSL-FO fop.长文本流入相邻的单元格/块,掩盖那里的东西 [英] XSL-FO fop. Long text flows into adjacent cells/block, obscuring stuff there
问题描述
谁能建议我一种让长字(如序列号)被包装的方法?我试过一些商业软件,没有这样的问题.这是一个 fop 错误还是可能有可用的解决方案?
Could anyone suggest me a way to make long words (like serial numbers) to be wrapped? I tried some commercial software and there is no such issue. Is it a fop bug or probably there is a solution available?
我无法在文档中每个单词的每个字符后插入零长度空格.这个解决方案对我来说听起来很疯狂.
I can't insert zero length space after each character of every word in document. This solution sounds insane for me.
推荐答案
您可以在 fo:block
中指定 wrap-option 属性,如下所示:
You can specify the wrap-option attribute in your fo:block
like so:
<fo:block wrap-option="wrap"> ... stuff </fo:block>
这是此属性的 XSL-FO 规范:
Here's the XSL-FO specification for this attribute:
XSL 定义:
价值:无包装 |包裹|继承
Value: no-wrap | wrap | inherit
初始:包装
适用于:fo:block、fo:inline、fo:page-number、fo:页码引用
Applies to: fo:block, fo:inline, fo:page-number, fo:page-number-citation
继承:是
百分比:不适用
媒体:视觉
值具有以下含义:
无包装
不会执行换行.
如果行长于的可用宽度内容矩形,溢出将按照规定处理上指定的溢出"属性参考区域.
In the case when lines are longer than the available width of the content-rectangle, the overflow will be treated in accordance with the "overflow" property specified on the reference-area.
包裹
如果出现以下情况,将发生换行行溢出可用块宽度.没有特殊标记或其他将进行治疗.
Line-breaking will occur if the line overflows the available block width. No special markers or other treatment will occur.
指定如何换行(换行)的内容要处理格式化对象.
Specifies how line-wrapping (line-breaking) of the content of the formatting object is to be handled.
实施必须支持"no-wrap" 值,在此定义建议,当值换行处理"是保留".
Implementations must support the "no-wrap" value, as defined in this Recommendation, when the value of "linefeed-treatment" is "preserve".
您还可以在 fo:table-cell
<fo:table-cell wrap-option="wrap"> ... </fo:table-cell>
并且其中的 fo:block
将继承该属性.
and the fo:block
s within will inherit the property.
这篇关于XSL-FO fop.长文本流入相邻的单元格/块,掩盖那里的东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!