使用 Prawn for Ruby on Rails 是否有寡妇孤儿保护?

发布于 2024-10-08 21:04:52 字数 216 浏览 0 评论 0原文

我有一个关于使用 Prawn for Ruby on Rails 的问题。

我正在使用边界框来表示可变长度的内容。当 内容溢出到下一页我想要某种 寡妇/孤儿保护到位。有没有推荐的解决方案 这?

有没有办法把上一页的内容打到最后 段落中断,然后将该段落带到下一页?

或者也许从上一页中取出最后 x 行,以便有 新页面中至少有 x+1 行吗?

想法? 建议?

I have a question about using Prawn for Ruby on Rails.

I'm using a bounding_box for variable length content. When the
content overflows to the next page I would like to have some sort of
widow/orphan protection in place. Is there a recommended solution for
this?

Is there a way to break the content from the previous page at the last
paragraph break, then carry that paragraph to the next page?

Or perhaps take the last x lines from the previous page so that there
are at least x+1 number of lines in the new page?

Thoughts?
Suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文