From: Wybo Dekker Date: 2005-01-04T08:58:27+09:00 Subject: Re: text/format loops on long words ---1463811840-1518821199-1104796584=:17375 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463811840-1518821199-1104796584=:17375" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811840-1518821199-1104796584=:17375 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 3 Jan 2005, Austin Ziegler wrote: > On Mon, 3 Jan 2005 03:21:09 +0900, Wybo Dekker wrote: > > This hangs, and it has to do with the last two words in the text to be > > too long (make columns 1 larger or body_indent 1 less and it works): > >=20 > > #!/usr/bin/env ruby > > require 'text/format' > > require 'tex/hyphen' > >=20 > > puts Text::Format.new( > > :body_indent =3D> 15, > > :columns =3D> 30, > > :hyphenator =3D> TeX::Hyphen.new, > > :split_rules =3D> Text::Format::SPLIT_HYPHENATION, > > :hard_margins =3D> true, > > :text =3D> "something pancakes electroencephalogram" > > ).paragraphs > >=20 > > I hope Austin Ziegler is looking... >=20 > I will look at this later this week. I am just back from a wonderful > vacation on the beaches of Cuba (got my hair braided and a wonderful > New Year's tan, thanks :) missed your picture attached ;-(( > and still have to finish rebuilding my main > development computer after a catastrophic hard drive crash (I haven't > yet installed Ruby on the machine, but it has finally been downloaded; > I just need to get the Windows build environment(s) set up that I will > be using). >=20 > My plan as I get back into the swing of things is to address > Text::Format. In the interim, can you test with Text::Hyphen instead > of TeX::Hyphen? The hyphenation rules in Text::Hyphen for English are > a little more up-to-date, although this may not help. I will try to > figure this out and form it into a test case and fix the problem as I > put Text::Format 1.0.0 together. Text::Hyphen has the same problem. But I don't think it has to do with the hyphenation algorithm. It's independent of the words used, only on their lengths.=20 =20 > For those people who are using Text::Format, I have a very important > question -- more people are using it than I had realised ;) I want to > change the initialisation idiom from the current "anything goes" to > either the form you presented or the currently-preferred > initialisation block that yields self (rather than using > instance_eval). >=20 > Are you okay if I make this change in Text::Format, or should I follow > the concepts of TeX::Hyphen =BB Text::Hyphen and make this Text::Format > =BB Text::Formatter? >=20 > -austin >=20 --=20 Wybo ---1463811840-1518821199-1104796584=:17375-- ---1463811840-1518821199-1104796584=:17375--