问题描述
有人可以建议我用长字(例如序列号)包装吗?我尝试了一些商业软件,没有这样的问题.是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:
值:无包装|包裹|继承
Value: no-wrap | wrap | inherit
初始:包装
适用于:fo:block,fo:inline,fo:page-number, fo:page-number-citation
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.
实施必须支持 定义为无包装"的值 推荐,当值 换行处理"是保留".
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跳线.长文本流入相邻的单元格/块,使此处的内容模糊不清的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!