NightSpirit Site Admin

Joined: 26 Nov 2002 Posts: 2955 Location: Enfield, London, UK
|
Posted: Sat Sep 08, 2007 5:15 pm Post subject: InDesign "No Break" Broken or Misunderstood? |
|
|
This thread is mainly a reminder to myself to look up the reasoning for a strange problem I had while creating an e-commerce site for work. The site allows clients to punch in their details in an online form and uses an InDesign backend to create a PDF of a business card for them.
The issue involved a text box which would display the following info:
Tel: +44 (0)00 0000 0000 Fax: +44 (0)00 0000 0000
Mobile: +44 (0)0000 000000 Email: name.surname@domain.com
When one element was not requested, the others should "snake round" in an inverted s manner. i.e. when there was no fax, the mobile should jump up next to the tel and email would occupy the second line all on it's own.
My solution to this was to ensure the paragraph style for this text block had the "no break" attribute turned off and each item was contained in a character style with "no break" turned on. In theory this would mean that the only places InDesign could break the line if it was too long was at the double-spaces between items, plus if the email address was too long to fit next to the mobile (which given the design was quite likely) it would drop to the third line in it's entireity.
However, things didn't go to plan and instead, when the email address reached the point of being too large for the text box, it broke in two and continued into the third line instead of jumping down. i.e.:
Tel: +44 (0)00 0000 0000 Fax: +44 (0)00 0000 0000
Mobile: +44 (0)0000 000000 Email: ivor.verylongname@domai
n.com
This is counter-intuative to me, as seeing as "no break" was applied from the beginning of the word email to the end of the email address, the whole item should not break. After two hours I did find a work-around which was to add a space in the middle of the email address, thus:
Tel: +44 (0)00 0000 0000 Fax: +44 (0)00 0000 0000
Mobile: +44 (0)0000 000000
Email: ivor.verylongname @domain.com
So, in order to stop an item breaking up inside a "no break" segment I have to add a space to it? I'm at a loss to explain why this is the case and will endeavor to find out at some point. _________________ Whedon: We will rule over this time slot, and we will call it... "This Time Slot".
Fox: I think we should call it... your grave!
Whedon: Ah, curse your sudden but inevitable betrayal!
Fox: Ha ha HA! Mine is an evil laugh...now die!
-- Rei |
|