[EmData] InData CS4 - Controlling Line Location of Line Breaks

Joe Mathia - Em Support support at emsoftware.com
Mon Feb 16 12:03:22 EST 2009


Hi JP,

On 2/16/09 9:39 AM, "Peter Fulton" <jpfulton248 at comcast.net> wrote:

> I’ve been trying to figure out how to control line breaks. See below for an
> attempt at a description of the problemo..
>  
> JP Fulton.................................... 248/123-4567(¬)
> 1154 Street Name Rd(¬)
> City, State Zip(¶)
>  
> The only line that I have trouble with is the first… some of the names are
> much longer… The phone number is formatted with a right align tab (b/c the
> phone needs to be right aligned). When the name is too long it ends of pushing
> the phone to the next line and it ends up left aligned.
>  
> 
To get the phone number flush right, you’ll need to a hard paragraph return
instead of the soft return that you’re currently using for the name/phone
number line.  That way, you can make the phone number paragraph
right-aligned.  Doing this, and also using a non-breaking hyphen, should
give you much better results.

> If the name is too long it really needs to break like this.
>  
> JP Donald(¬)
> Bartholomew Fulton............... 248/123-4567(¬)
> 1154 Street Name Rd(¬)
> City, State Zip(¶)
>  
> Believe it or not, I have actually written a ridiculous amount of code that
> actually measured all of the characters of the alphabet in order to determine
> the length of the name. Each letter has it’s own value set into a variable.
> The prototype then calls the variables and adds them as they appear in the
> name. If the total is over a specified number (sum of value of width of
> letters), the line breaks. This has proven to be imperfect (line either
> doesn’t break or breaks unnecessarily) most likely due to variable width fonts
> that I may choose to use in other sections of this project or simply being a
> little off in my initial measurements.
>  
> I know this is extremely detailed and an extremely specific request, but any
> help figuring out a method to make this work would be GREATLY appreciated.
> 
> 
Controlling line breaks by counting characters can never be an exact
science.  Unfortunately, it is the best tool we have for doing what you’re
after.  And, if you’ve gone so far as to take character widths into account,
you’ve taken it farther than I usually do.  I’m guessing you’re setting your
tolerances a bit too tight.  Counting characters, it’s generally best to end
up with a few un-necessary breaks so as to avoid breaks that don’t get made.
> 

Regards,

Joe Mathia
Em Software Support / support at emsoftware.com / www.emsoftware.com
(+1) 740 284 1010, fax (+1) 740 284 1210


> 
>  
> Thanks a mil,
>  
> JP
> 
> 
> _______________________________________________
> Data-users mailing list
> Data-users at emsoftware.com
> http://mail.emsoftware.com/mailman/listinfo/data-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://emsoftware.com/pipermail/data-users/attachments/20090216/7a45e761/attachment.html


More information about the Data-users mailing list