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

Subject: Re: [xsl] Dynamically determining line wraps in HTML table cell output
From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Apr 2019 07:45:24 -0000
On Tue, 2019-04-23 at 01:48 +0000, Larry Hayashi lhtrees@xxxxxxxxx
wrote:
>  Are there ways to calculate width
> using XSL other than just string length?

If by XSL you mean XSLT, therebs 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 donbt know whether you
can import the result into Microsoft Word easily. You could generate MS
Wordbs 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/

Current Thread