Wanting a script for No Line Break for an Email address not to break apart

395 views
Skip to first unread message

Robert Humphrey

unread,
Mar 27, 2015, 2:05:31 AM3/27/15
to xmpie...@googlegroups.com
I am new to this whole Q-Lingo and XMPie stuff. 

I am using a MAC OSX with 10.7.5 and I am working in Adobe CC 2014 10.2.0.69 release
I am using XMPie uCreate Print Designer version 7.1.1 build 8008.

 I have a text box with three sets of phone numbers and an email at the bottom.  When all three phone numbers are present and the email is too large for the box, then I have the Dynamic Story Length to Copy fit on overflow turned on and this works fine.
 When one of the phone numbers are are not present and the email is too long, then the email breaks and wraps down to the open line.  NOT what I want to happen!

 Is there a Q-Lingo to keep the Email on the same line or not to break so the Copy Fitting will work and reduce the font in the whole box to fit??  I have the Dynamic feature of Suppress Trail Spaces on Empty Content turned on also to have the lines move up accordingly.


Example with all the fields filled:

Phone: 847-555-5555
Cell: 847-123-4567
Fax: 847-555-9999
Email: exa...@test.com

Example with a number field not present:

Phone: 847-555-5555
Fax: 847-555-9999
Email: example@test
.com

 I want to keep the email on the same line!

 I hope I am not the only one with this problem and there is a script to help me.

Thank you.
Bob

Tyrone

unread,
Mar 27, 2015, 3:18:02 AM3/27/15
to xmpie...@googlegroups.com

In Indesign highlight your text for Email and in the top right hand corner there is a dropdown menu and select no Break.

 

 

Regards,

 

Tyrone O’Brien

Director | Professional services | Multi-Channel Developer

 

Description: connect_E_logo

 

P: 041 661 4187

E: tyr...@connect1to1.com.au

W: www.connect1to1.com.au

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To post to this group, send email to xmpie...@googlegroups.com.
Visit this group at http://groups.google.com/group/xmpie-users.
For more options, visit https://groups.google.com/d/optout.




This email has been checked for viruses by Avast antivirus software.
www.avast.com


image001.jpg

Prithvi Jagannadh

unread,
Mar 27, 2015, 3:37:05 AM3/27/15
to xmpie...@googlegroups.com
Hi Bob,

This can be achieved by a simple method. Try to find out the maximum possible characters for the attribute. Adjust your textbox's width according to the count. So, even when Suppression is enabled, it does not effect email field.

This works even if your email field's input is static / dynamic.

Ty.
Prithvi Jagannadh.

Robert Humphrey

unread,
Mar 27, 2015, 9:57:55 AM3/27/15
to xmpie...@googlegroups.com
Tyrone ob,
 Thank you soooooo much for this tip!

 I have been working in InDesign CS6 for many years and now I am working at a new job and they are using the latest and greatest versions of CC 2014 and I have noticed that Adobe has moved where to locate things like this around. I am still trying to find items like this one.

 I have been going round and round with XMPie for about a month now for not having a script for this in their Q-Lingo and the answer was in InDesign all the time, I just could not find that feature.

Thank you, thank you.

Bob

Sylvain

unread,
Apr 17, 2015, 2:36:18 PM4/17/15
to xmpie...@googlegroups.com
That works as long as the adore contains only an email address. If you have an adore that's got text and an email, the proposed solution will not work because no break gets applied to the adore, not part of the adore. If you have a string of text that has an email address in it, you can surround the email address with the delimiter of your choice and use grep styles to keep the email from breaking, and use another grep style to hide the delimiter.

Paul Abney

unread,
Apr 20, 2015, 9:52:25 AM4/20/15
to xmpie...@googlegroups.com
I agree with Sylvain,
This calls for a grep style. Here is what I use for catching emails in a monthly letter that we do.

[-\u\l\d._]+@[-\u\l\d_]+\.[\u\l]{2,4}

and here is a break down of what this does.


Paul Abney

unread,
Apr 20, 2015, 9:54:11 AM4/20/15
to xmpie...@googlegroups.com
Sorry,
My explanation got lost. Here is what the grep above looks for.

[-\u\l\d._]+@[-\u\l\d_]+\.[\u\l]{2,4}


[
Inclusion: any character in this group

-
A regular character

\u
Any uppercase character (A..Z)

\l
Any lowercase character (a..z)

\d
Any digit (0..9)

._
Any of these characters

]
End Inclusion Group

+
Any character in this group may occur once or more times; longest possible match will be taken

@
Literal character “@”

[
Inclusion: any character in this group

-
A regular character

\u
Any uppercase character (A..Z)

\l
Any lowercase character (a..z)

\d
Any digit (0..9)

_
The character “_”

]
End Inclusion Group

+
Any character in this group may occur once or more times; longest possible match will be taken

\.
Literal period

[
Inclusion: any character in this group

\u
Any uppercase character (A..Z)

\l
Any lowercase character (a..z)

]
End Inclusion Group

{2,4}
Repeat any character in this group at least 2 and at most 4 times



[ - \u \l \d ._ ]+@ [ - \u \l \d _ ]+\. [\u \l ]{2,4}

Mark Kuehn

unread,
Apr 20, 2015, 10:51:15 AM4/20/15
to xmpie...@googlegroups.com
That will work as long as the domain part of the email is of the type "company.com" or "company.info", this will fail if the domain part is "us.company.com" or "mail.company.info" or "history.museum".

-Mark

--

Sylvain

unread,
Apr 20, 2015, 1:46:38 PM4/20/15
to xmpie...@googlegroups.com
If do not control how and/or when the email address gets added to the string of text, you'll need to find another solution than mine, though it can be adapted.
If you do have control over how and/or when the email gets added to the string of text, then the following works great; at least it does for me.

Since Emails are 'usually' passed on their own, that means emails are usually inserted "inline" with the text like such:
"If you'd like to contact us, please do it through " + |->[EmailAddress] +" and we'll get to you quickly"
"If you'd like to contact us, please do it through " + @[EmailAddress] +" and we'll get to you quickly"

With my solution you'd write the same thing with additional tags, like such:
"If you'd like to contact us, please do it through <email>" + |->[EmailAddress] +"</email> and we'll get to you quickly"
"If you'd like to contact us, please do it through <email>" + @[EmailAddress] +"</email> and we'll get to you quickly"

The following will get to indesign:
"If you'd like to contact us, please do it through <email>Joh...@WhateverDomain.com</email> and we'll get to you quickly"
Of course you can't have it show up like that because code tags don't belong in the output.

This is where Grep Styles come into play
Apply Style: <<Your defined character style that hides the email tags>>
To Text: (<email>)|(</email>)

And you create a Grep Style that keeps the content of <email>TheContentIsThis</email> from breaking
Apply Style: <<Your defined Character style that keeps the email from breaking>>
To Text: (<email>).*?(</email>)
Reply all
Reply to author
Forward
0 new messages