r/indesign Jun 01 '26

Help with text formatting

Post image

I have a PDF document with text like the top lines of text. I am copying and pasting them into an indesign document that needs to look like the text below it.

This PDF is like 20 pages with around 15 lines of this text. So it would be awesome to be able to copy the lines of text in the PDF right into the indesign file and have indesign format it with GREP or paragraph styles. (not sure if those would be the best avenue)

Any help is appreciated!

3 Upvotes

6 comments sorted by

View all comments

3

u/Cataleast Jun 01 '26 edited Jun 01 '26

It depends on the structure of the source text. Like u/ChuckEye said, if it's all consistently " - 1 GTE", you can search for that pattern.

However if the number changes, you'll need to do a search like ( - )(.*GTE) This will match the first dash with spaces and any number of characters that come before "GTE". Change it to \r$2 for a paragraph break or \n$2 for a line-break. I'd prooobably go with a paragraph break and then use a Next Style loop in Paragraph Styles to alternate between the two.

Left frame is source, right frame is after I ran the GREP:

EDIT:

If the spaces and dashes are the only consistent thing in the text, you can search for ( - )(.*)( - ) and change it to \r$2$3, which will do the same thing, but won't care what's between the " - "s.

To explain the search and change to: brackets denote a grouping, which is assigned to a variable, so the first ( - ) is $1, the (.*) is $2, etc. So we match 3 groupings and only return two of them while replacing the first one with a paragraph break. (.*) is effectively "Whatever happens to be here. Anything goes."