1

I'll describe this the best I can.

I have managed to make a data merge in InDesign for some point of sale tickets (we currently use publisher and would love to move to the 21st century but just haven't been able to work out how, plus we are extremely limited with the layout & design we can use with publisher)

As it stands when we enter in our product description via mail marge in publisher the product description automatically adjusts to fit the qty of words in the product description weather that is 4 words or 6 or even more the text adjusts to fit the space. (same with the Sale price) As you can see with the below examples. 2 word product description enter image description here 4 word product description 4 word product description 7 word product description 7 word product description 9 word/character description enter image description here

The question is how do I get this automatic size adjust to work in indesign? without having to resize every product description & sale price. As you can understand doing that for 300 - 500 tickets is just not a viable use of time.

I did come across the below website but this only explains how to get a single word with varying character numbers to adjust. not multi worded https://colecandoo.com/2012/02/18/square-pegs-now-fit-into-round-holes/

Any insight into if this is even possible or pointing me in the right direction would be awesome. Or even reducing the amount of manual adjustment per ticket & without having to have multiple documents per product description size.

  • If you don't want to work with Grep styles you may try MyDataMerge for Mac which controls, extends and manages Indesigns data merge. Fit text to frame is built in and can be easily applied within a data merge - so it doesn't matter if you have 2 words or 90. – Pat_Morita Mar 21 at 23:54
1

Try making a different GREP Style for each case in the same Paragraph Style, except the first one, TWO WORDS

The original PRICE TOP TEXT Style has the options for the TWO WORDS, with leading = 0, because it is just one line, the other text will have their own leading at the GREP Character Style.

Tested with the question words:

Test

This is the GREP contain for FOUR WORDS:

(.+\s){3}(.+)

Means: all characters until a space repeated three times plus all characters (this makes the fourth word)

SEVEN WORDS:

(.+\s){6}(.+)

NINE WORDS:

(.+\s){8}(.+)

The character style of each GREP defines the size and leading of each case. The NINE WORDS Character Style has the Small Caps.

character styles

  • Interesting but don't forget that \w will match only word characters. It won't catch characters like apostrophes or amperstands. "Wild River Men’s & Ladies Hike Shirt" will cause trouble ^^ – Vinny Sep 3 '18 at 13:58
  • @Vinny You are right, answer updated – Danielillo Sep 3 '18 at 14:02
  • I'm afraid that won't work either since . would also catch the spaces... Not tested though... – Vinny Sep 3 '18 at 14:10
  • @Vinny I did, answer updated – Danielillo Sep 3 '18 at 14:15
  • 1
    Right! Interesting. I thought Grep would be more greedy ^^ – Vinny Sep 3 '18 at 14:47
0

Colin's technique (Colecandoo website) is the right direction.
Single or multi worded paragraph makes no difference, his technique is based on the number of characters. And a space is a character.

Although I would prefer using {n} (repeat number of times) expression.
.{5} instead of .....
This grep expression will also allow you to use a range of character.
e.g. .{5,10} means from 5 to 10 characters.

You could even add ^ and $ in order to force the grep style to catch the entire paragraph. Like this: ^.{5,10}$

Now, unless you are using a fixed-width font, you will probably encounter some trouble...

Another way to deal with your case would be to count words instead of characters. Edit: well, Danielilo did post his answer in the mean time that describe this way. But it might not be as simple as it looks...

  • Working with GREP is never simple, despite the details, my answer is quite generic. The designer who needs it, if chooses it as an option, should adjust it to the own project. – Danielillo Sep 3 '18 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.