[Date Prev][Date Next]
[Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[New search]
To: Jay Smith <jay@xxxxxxxxxxxx>, framers@xxxxxxxxxxxxxx (Framers List), "Free Framers" <framers@xxxxxxxxx>
Subject: Re: Tabbed text wrapping when not desired
From: DW Emory <danemory@xxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Oct 2003 10:59:15 -0700
In-Reply-To: <LYRIS-118537-155922-2003.10.18-18.37.35--danemory#globalcrossing.net@lists.FrameUsers.com>
Sender: owner-framers@xxxxxxxxx
I assume there are four fields---the description field and 3 price fields. I also assume that the three tab stops for the prices are all right tabs, thus the total length (including the tab stops) of the three prices is a known constant. I can think of only one solution to your dilemma: 1. Even though the font you're using is not monospaced, you must operate on the premise that it is monospaced, thus you know exactly how many characters will fit on a line for a given font size. Let's say that the characters per line with this assumption is 50. 2. In the pre-processing that is performed between the database and the production of the MIF files, you must also calculate the string length of the description field, divide it by 50, and determine the remainder, which is the character count in the last line of the description. 3. Having now determined how many characters are in the last line of the description, and also knowing the constant length of the three price fields (including the 3 tab stops), you can now determine whether the three price fields can fit on on the same line as the last line of the description. If they won't fit, you insert into the MIF a soft return before the first tab stop. And by the way, if you were using UniMerge to produce the MIF file from the database output (in character-delimited fields, for instance) UniMerge's string manipulation commands could be used to easily accomplish what I have described above. The final UniMerge command would be IF (last_line > X) put in a soft return before the tab stop preceding the first price ELSE prices go on same line as last line of description END Where X is the maximum allowable number of description characters in the last line in order for it to also include the fixed length of the prices. AND last_line is a UniMege-defined user variable whose value is obtained by the process described in step 2 above. At 08:29 PM 10/18/03 -0400, Jay Smith wrote: >Hi, > >I am using FM 5.5.6 on Windows 95 (I know, I know.... please don't say it). > >I have not been able to find the answer to this in my personal Frame >mailing list archive of over 63,000 messages. (The subject of tabs is >very rare other than relating to TOC, Bleed, and tabbing in tables.) > >I am having a problem with tabbed text wrapping in undesired ways. The >situation is what I call "menu" (as in dining) listings. The prices (one >or more) are in the lower right, following the text. > >In this situation, I do *not* wish to use tables to format the text. (The >content is coming to me in the form of very simple MIF files that have >been generated as database output. > >There are tab stops before the first price and between the prices. I can't >use hard spaces because of proportional fonts and varying numbers of >digits; the prices need to line up. > >DESIRED: Notice that there are three price colums -- the prices are >pushed over by tabs. THIS IS THE APPEARANCE I WANT. > > This is a description listing that has various > amounts of text that can be short or can go > on and on and on. 123.00 456.00 789.00 > >When there is more/less text that does not allow the prices to fit in >"their space", I DO WANT all three prices pushed TO THE NEXT LINE, intact, >unbroken: > > This is a description listing that has various > amounts of text that can be short or can go > on and on. But now too much. > 123.00 456.00 789.00 > >Instead, WHAT I GET looks something like: > > This is a description listing that has various > amounts of text that can be short or can go > on and on. But now too much. 123.00 456.00 > 789.00 > >I have tried different combinations of tabs (left, right, decimal), run-in >paragraph for the description, etc., etc. I have not been able to find a >combination that works when there is not enough space on the line for ALL >the prices to be present intact and unbroken. > >Each time the MIF files are (frequently) processed, several hundred FM >files will be created or re-created. There is not enough time to find the >format problems and tweak them. Even so, the tweaks would be lost the >next time the cycle is run. > >Is there anything that can be done in FM 5.5.6 to solve this problem? > >Is the problem solvable in a later version of FM? If so, how? > >Jay > >-- >Jay Smith > >e-mail: Jay@JaySmith.com mailto:Jay@JaySmith.com >website: http://www.JaySmith.com > >Jay Smith & Associates >P.O. Box 650 >Snow Camp, NC 27349 USA > >Phone: Int+US+336-376-9991 >Toll-Free Phone in US & Canada: > 1-800-447-8267 >Fax: Int+US+336-376-6750 > > >-------------------------------------------------------------------------- > >2003 FrameUsers Conference: http://www.FrameUsers.com > >-------------------------------------------------------------------------- >Archives: http://lists.frameusers.com/cgi-bin/lyris.pl?visit=framers >Website: http://www.FrameUsers.com >Administration: listadmin@FrameUsers.com > >You are subscribed to framers as: danemory@globalcrossing.net >Send a blank email to leave-framers-118537M@lists.FrameUsers.com to >unsubscribe. FrameMaker/FrameMaker+SGML Document Design & Database Publishing DW Emory <danemory@globalcrossing.net> ** To unsubscribe, send a message to majordomo@omsys.com ** ** with "unsubscribe framers" (no quotes) in the body. **