Copy link to clipboard
Copied
[InDesign 18.1, Mac)S 11.7.4]
How to "Remove Blank Lines" without affecting paragraph styles?
I'm designing cards for a board game. The client requested that each card ability have a distinct background and border, so I've made different Paragraph Styles for each. Each ability is its own column in the spreadsheet. No cards have all ability types, but most cards have a mix of 2 or 3. You can see them linked here with the Paragraph Style applied to each one.
When I preview this normally, here's how one of the cards looks. I'd like to automatically remove those blank variables from the deck when I create a merged document.
If I use activate "Remove Blank Lines..." in Content Placement Options, I get paragraph style overrides. In the example below, the previous page had a blank variable for the second paragraph, so it was deleted. However, that means the second paragraph on this page has the first Paragraph Style.
Over the course of an entire deck, eventually all paragraphs in this text field get the first Paragraph Style instead of keeping their own.
I saw some bug reports that this has been fixed in InDesign v17.1, so I'm not sure why it's still occurring in 18.1.
tl;dr: Any advise for how to delete these blank lines without overriding the paragraph styles? I'd really prefer to do this at the data merge level rather than a post-merge script or search-replace.
There is a very long thread from 2013 at https://community.adobe.com/t5/indesign-discussions/multiple-record-data-merge-into-paragraph-styles-applies-the-wrong-style/td-p/5633549#5883785 that covers this problem and has a scripting solution worked out by Uwe Laubender.
Copy link to clipboard
Copied
There is a very long thread from 2013 at https://community.adobe.com/t5/indesign-discussions/multiple-record-data-merge-into-paragraph-styles... that covers this problem and has a scripting solution worked out by Uwe Laubender.
Copy link to clipboard
Copied
That is indeed a long conversation! I tried the gist of their solution:
After merging the document without removing blank lines, here's how one page looks:
I ran a text search for <FEFF>, resulting in only a few the blank lines being deleted, but generally cleaning up the document for the next step.
Then I ran a GREP search for ^\s+ which deletes any remaining blank lines, all without affecting the other paragraph styles! Huzzah!
It would've been nice to make this an automatic process before the merge, but at least this is a reliable backup option. If anyone has ideas for making it automatic, I'm all ears!
Copy link to clipboard
Copied
@Peter Spier I found one small hitch in this solution. It results in one extra white space character at the end of the text, making a gap from the bottom of the text frame. (This text frame is set to flow from the bottom):
I'm not sure what that special character is. I can't select it, but I can manually delete it, resulting in what I would prefer the text to look like.
Any idea what I should be searching for to get rid of that one last pesky blank line?
Copy link to clipboard
Copied
@Peter Spier Oh! I figured it out. Just GREP searched and deleted \r\z and that did the trick. Thanks again!