Re: Wrapping Long Text Without Spaces
On Apr 6, 2007, at 14:58, Vincent Hennebert wrote: Hi Jeff / Vincent, - or you enable hyphenation and use ZWSP instead of the regular hyphen character. Thus FOP will break inside words that it is able to hyphenate; if they aren't normal English words this may not work well and you may prefer the first method. IIRC, this is not entirely correct: with hyphenation turned FOP will always hyphenate words, period. AFAIK, there is no situation where FOP wouldn't be able to hyphenate. Using the hyphenation patterns, you can only indicate that certain hyphenation points are undesirable, but you can never turn on hyphenation and do something magical to keep FOP from hyphenating. So, IOW, there is no word that FOP won't be able to hyphenate. Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrapping Long Text Without Spaces
Hi Jeff, Jeff Vannest a écrit : >> Just FYI: the other known workaround (which fits some scenarios >> better than inserting ZWSPs) would be to activate hyphenation, and >> use a ZWSP as hyphenation-character... In that case, FOP will > > This is new to me, so let me see if I understand: A ZWSP is implicit between > characters. For example, the word "CAT" would contain three characters and > two ZWSP: C-ZWSP-A-ZWSP-T. Setting hyphenation to ZWSP would allow wrapping > as: Not exactly, in fact the two methods will lead to different results: - either you manually put ZWSP after underscores in your words, which allow FOP to break words after them; - or you enable hyphenation and use ZWSP instead of the regular hyphen character. Thus FOP will break inside words that it is able to hyphenate; if they aren't normal English words this may not work well and you may prefer the first method. HTH, Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrapping Long Text Without Spaces
> Just FYI: the other known workaround (which fits some scenarios > better than inserting ZWSPs) would be to activate hyphenation, and > use a ZWSP as hyphenation-character... In that case, FOP will This is new to me, so let me see if I understand: A ZWSP is implicit between characters. For example, the word "CAT" would contain three characters and two ZWSP: C-ZWSP-A-ZWSP-T. Setting hyphenation to ZWSP would allow wrapping as: CA T ...or... C AT I think this sounds like the solution to use! Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrapping Long Text Without Spaces
On Apr 5, 2007, at 14:45, Manuel Mall wrote: Hi Jeff / Manuel, Does FOP only wrap text on spaces? What I'm seeing is that text placed in a cell will overrun the cell boundaries if the text does not contain a space. Assuming you are using the lastest FOP version instead of actually modifying FOP you could make your stylesheet insert a zero width space after each underscore as that would create a line break opportunity. Just FYI: the other known workaround (which fits some scenarios better than inserting ZWSPs) would be to activate hyphenation, and use a ZWSP as hyphenation-character... In that case, FOP will ultimately always break the words if they don't fit the available space. Note that you do need the hyphenation patterns from OFFO, in that case, as described here: http://xmlgraphics.apache.org/fop/0.93/hyphenation.html Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrapping Long Text Without Spaces
On Thursday 05 April 2007 20:32, Jeff Vannest wrote: Assuming you are using the lastest FOP version instead of actually modifying FOP you could make your stylesheet insert a zero width space after each underscore as that would create a line break opportunity. Manuel > Does FOP only wrap text on spaces? What I'm seeing is that text > placed in a cell will overrun the cell boundaries if the text does > not contain a space. > > I've attached a PNG showing the symptom. The example contains four > cells (with four column headings) each containing boundary text as > follows: > > Method: COA BOUNDARY_METHOD 01MAR_ABCDEFGHIJ_END > Operation: COA BOUNDARY_OP 01MAR_ABCDEFGHIJKLMN_END > Procedure: N/A > Component: COA BOUNDARY_COMP 01MAR_ABCDEFGHIJKL_END > > Because certain sections of text are very long without spaces, and > because no hyphenation support is configured, the text starts to > overrun cell boundaries. > > > Analysis of Example > > > The Method cell correctly wraps after "COA ". However, I'm guessing > that "BOUNDARY_METHOD" is too wide for the cell, so wrapping stops, > and instead "BOUNDARY_METHOD 01MAR_ABCDEFGHIJ_END" is simply printed > non-stop across the first 3 columns. > > The Operation cell has a problem. I assume that this cell knows that > it cannot wrap because the Method cell already consumes this space, > so it simply writes all text across columns 2-4. > > The Procedure cell prints "N/A" as it should, but it is already > obscured by the Operation overflow text. > > The Component cell prints and wraps correctly, but is partially > obscured by the Operation overflow text. > > > Hyphenation > === > Why not enable hyphenation support? Good question, with hopefully, a > good answer: Our implementation will be writing chemical and > scientific data, and I assume that they hyphenation patterns will not > 1) support scientific names without ongoing tweaking for every new > chemical name added, and 2) be preferred by our readers, who are very > particular that data appear unaltered. > > In our previous solution using Oracle Reports, long words were simply > broken across lines. For example, if the text "COA BOUNDARY_METHOD" > did not fit into a single cell, it might hard-break the text as > > COA BOUNDARY_ME > THOD > > This is suitable to our readers, since it represents no artificial > modification of the name (no hyphenation), and it does not obscure > data in cells to the right. > > > Questions > = > > Sooo. > > 1) Can FOP be configured to wrap on characters other than space? Like > underscore, for example? This would decrease the occurrence of the > problem. > > 2) If I were to modify the FOP code to hard-break words when no space > is found, where would that modification occur? (I assume this support > would be "turned on" in the configuration file or whatever.) > > Thanks for your thoughts in advance, and for all the hard work you do > on FOP! > > Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wrapping Long Text Without Spaces
Does FOP only wrap text on spaces? What I'm seeing is that text placed in a cell will overrun the cell boundaries if the text does not contain a space. I've attached a PNG showing the symptom. The example contains four cells (with four column headings) each containing boundary text as follows: Method: COA BOUNDARY_METHOD 01MAR_ABCDEFGHIJ_END Operation: COA BOUNDARY_OP 01MAR_ABCDEFGHIJKLMN_END Procedure: N/A Component: COA BOUNDARY_COMP 01MAR_ABCDEFGHIJKL_END Because certain sections of text are very long without spaces, and because no hyphenation support is configured, the text starts to overrun cell boundaries. Analysis of Example The Method cell correctly wraps after "COA ". However, I'm guessing that "BOUNDARY_METHOD" is too wide for the cell, so wrapping stops, and instead "BOUNDARY_METHOD 01MAR_ABCDEFGHIJ_END" is simply printed non-stop across the first 3 columns. The Operation cell has a problem. I assume that this cell knows that it cannot wrap because the Method cell already consumes this space, so it simply writes all text across columns 2-4. The Procedure cell prints "N/A" as it should, but it is already obscured by the Operation overflow text. The Component cell prints and wraps correctly, but is partially obscured by the Operation overflow text. Hyphenation === Why not enable hyphenation support? Good question, with hopefully, a good answer: Our implementation will be writing chemical and scientific data, and I assume that they hyphenation patterns will not 1) support scientific names without ongoing tweaking for every new chemical name added, and 2) be preferred by our readers, who are very particular that data appear unaltered. In our previous solution using Oracle Reports, long words were simply broken across lines. For example, if the text "COA BOUNDARY_METHOD" did not fit into a single cell, it might hard-break the text as COA BOUNDARY_ME THOD This is suitable to our readers, since it represents no artificial modification of the name (no hyphenation), and it does not obscure data in cells to the right. Questions = Sooo. 1) Can FOP be configured to wrap on characters other than space? Like underscore, for example? This would decrease the occurrence of the problem. 2) If I were to modify the FOP code to hard-break words when no space is found, where would that modification occur? (I assume this support would be "turned on" in the configuration file or whatever.) Thanks for your thoughts in advance, and for all the hard work you do on FOP! Jeff boundary.png Description: PNG image - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]