xsl-list
[Top] [All Lists]

Re: [xsl] Dynamically determining line wraps in HTML table cell output

2019-04-23 02:45:29
On Tue, 2019-04-23 at 01:48 +0000, Larry Hayashi lhtrees(_at_)gmail(_dot_)com
wrote:
 Are there ways to calculate width
using XSL other than just string length?

If by XSL you mean XSLT, there’s some sneaky ways - for example, making
an XML version of font character widths and ignoring kerning &
ligatures will get you a long way with most Western languages and
scripts.

If by XSL you mean to include XSL-FO, you can use Tony Graham's area
tree extension in Antenna House Formatter to get an XML rendition of
text. Another way to achieve what you want might be to use ruby
annotations to do your interlinear gloss, but i don’t know whether you
can import the result into Microsoft Word easily. You could generate MS
Word’s XML with Ruby annotations in it though - see e.g.
https://blogs.msdn.microsoft.com/murrays/2014/12/27/ruby-text-objects/

The advantage of using Ruby is that Word will then break groups of
lines together, as you need.

Liam


-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Web slave for vintage clipart http://www.fromoldbooks.org/
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>