Discretionary Line Breaks

600 views
Skip to first unread message

Ed Wong

unread,
Jan 9, 2013, 11:21:23 AM1/9/13
to xmpie...@googlegroups.com
I need a way to break long lines that are currently being done arbitrarily by a prepress operator in Quark. Currently our prepress gets a data file and flows it into a Quark doc running Xdata. Afterwards they view the compiled Quark doc and look for long lines and visually break them with soft returns.

My job it to port this work over to XMPie. I've already laid-out the proper text style in InDesign, started a uPlan but I'm stuck on how to beak a line in QLingo. I could just let the text flow and afterwards hack the resulting PDF file to fix poor line breaks (client fussy on style) but I was hoping for a way to break the lines using QLingo.

I would be grateful if someone could tell me how to look at a line, check number of words or letters, if longer than 'x' then break line at 'y'. I do need to turn hyphenations off in XMPie if it overrides InDesign. I already did so in InDesign. This code is way beyond my experience level.

Thank you in advance if you can help me with this,
Ed

George Marsh

unread,
Jan 9, 2013, 12:39:47 PM1/9/13
to xmpie...@googlegroups.com
Ed, InDesign does quite a reasonable job at this if you set it to use paragraph composer and balance ragged lines. What it isn't good at is looking down a page and balancing across paragraphs. This can mean one full measure paragraph is followed by another that is only 2/3rds wide.

I don't really understand your application to know how to help further. I don't think QLingo could help with discretionary breaks as it can't see the document.

In my projects if I need specific line breaks then I set them myself using "\n" in uPlan, and then test with the longest/ shortest known variables within that paragraph.

Ed Wong

unread,
Jan 9, 2013, 1:08:35 PM1/9/13
to xmpie...@googlegroups.com
Thanks gxm,

I did not know about 'balance ragged lines' in InDesign, will give that a try.

I lost you on using "\n" in uPlan. How would you implement this in uPlan to break a line?

Thank you,
Ed

George Marsh

unread,
Jan 9, 2013, 1:15:46 PM1/9/13
to xmpie...@googlegroups.com

I lost you on using "\n" in uPlan. How would you implement this in uPlan to break a line?

If you had a uPlan string:

"Discretionary Line Breaks"

And you wanted to add manual line breaks before each word it would look like: 

"Discretionary \nLine \nBreaks"

And would print like:

Discretionary 
Line 
Breaks

\r is a new paragraph which is good for bullets or nested styles

All this is in the uPlan manual I think?

Walter van Waard

unread,
Jan 9, 2013, 1:22:03 PM1/9/13
to xmpie...@googlegroups.com
Ed,

just add the \n to your string that you want a hard return to happen ..

Walter

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/xmpie-users/-/ATbMYVYo6KwJ.
To post to this group, send email to xmpie...@googlegroups.com.
To unsubscribe from this group, send email to xmpie-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xmpie-users?hl=en.

Ed Wong

unread,
Jan 9, 2013, 1:51:05 PM1/9/13
to xmpie...@googlegroups.com
Okay, I get that now.

Last question on this, I'm getting Excel files for the data. The data has a "Title" and a "Subtitle". Sometimes one or the other run long and the client wants to even out the line breaks. I know if I create a second column for a long line and cut and paste data from a long line to the second column to break the line. Then add the second column in uPlan.

Is there any code that I can add to the Excel data that will get honored by the uProduce server? Like, is there any way to add a soft or hard return in a cell?

Thank you both very much for your time,
Ed

Walter van Waard

unread,
Jan 9, 2013, 1:54:09 PM1/9/13
to xmpie...@googlegroups.com
Ed,

Try adding the \n to your Excel data and look what is does ;-)

Walter

To view this discussion on the web visit https://groups.google.com/d/msg/xmpie-users/-/DhTXa1JMXdIJ.

Ed Wong

unread,
Jan 9, 2013, 2:25:00 PM1/9/13
to xmpie...@googlegroups.com
Hi Walter,

I cannot get the \n to work in my Excel file.

Here is the data cell string:  105-Ct. LED \n Icicle Light Set

And my output looks just like this with no line break: 105-Ct. LED \n Icicle Light Set  

So I must be doing something wrong. Note: I'm using the QLing function "Trim" on this data field because the customers data is full of extra spaces. Could that be stopping the line brakes? I'm going to try without the Trim function next.

Ed

Ed Wong

unread,
Jan 9, 2013, 2:40:42 PM1/9/13
to xmpie...@googlegroups.com
Well,

Could not get this to work with \n.

I did google soft return and I got this:  Alt + Enter

This breaks the line in a cell so I can do the discretionary line breaks before I run the job. The I don't have to hack the resulting PDF file.

Thanks again for your valuable time,
Ed

Walter van Waard

unread,
Jan 9, 2013, 2:43:46 PM1/9/13
to xmpie...@googlegroups.com
 Ed,
 It was just something i wanted to see if that would work.
You are not doing anything wrong....sometimes the solutions we come up with  are trial and error.
Normaly we do not use Excel as a database...which it isn't ;-)
But the whole world thinks otherwise ....

Thanks
Walter

To view this discussion on the web visit https://groups.google.com/d/msg/xmpie-users/-/dHoLNoHnzzcJ.
Reply all
Reply to author
Forward
0 new messages