Skip to main content
Nemesis666first
Inspiring
December 17, 2021
Question

How create a "Return to the Line" / "Carriage Return" in a "Style GREP" replacement

  • December 17, 2021
  • 6 replies
  • 3287 views

Hi everyone,

I'm looking something a bit complicated I think.

I'm using a Data Merge file, and I use the Style GREP for replacing some "styles" (like replacing the size, the contour and the color of some words or ligatures).

This work(s?) very well, but... I cant return to the line / carriage return with this technic, since I can only write on one line of text.

Any idea ?

Maybe I can replace a chain of character which will be understood by the software as a Carriage Return ?

This topic has been closed for replies.

6 replies

Nemesis666first
Inspiring
December 31, 2021

Composer in Single Line Adobe and S.L. Universal Adobe works better, indeed. Thx.

Nemesis666first
Inspiring
December 30, 2021

I will try. Until now I used an uncuttable space ALT 254.

Nemesis666first
Inspiring
December 31, 2021

ALT+255* sorry.

Nemesis666first
Inspiring
December 29, 2021

I found an interesting way to do that :

 

https://creativepro.com/controlling-line-breaks-with-data-merge/

 

But, this come with a strange behavior :

 

"This is an example of text.  This is a whole new line." (notice the "space space" at the end).

This give me :

"This is an 

example of text.

This is a whole new line."

So, obviously, it works, but... Well... The word "example" could be after the word "an", there is space for it.

"This is an example

of text.

This is a whole new line."

Strange, right ?

brian_p_dts
Community Expert
Community Expert
December 29, 2021

Your paragraph composer is probably trying to balance ragged lines. Play with your paragraph style  settings (Spacing/Indents and Justification, namely) to get example back on the top line. I still don't know why adding crazy tracking to a document is better then just running a F&R after the merge is complete. 

Nemesis666first
Inspiring
December 29, 2021

I tried the 9 alignments settings, checked and unchecked the "ragged lines" option, none of them changed it.

I dont know what "merge is complete mean".

I think you want to explain me to "generate a merged file", but if I generate each file, of course I will obtain raw datas, but I need my file to stay dynamic of course, or else I cant work on it, obviously. Or else, what ? I will have to apply a F&R each time I want to extract it ? This is not possible, the alignment of text is based on the number of character, I need to see it before generating or else I will have to 1 : generate, check the issue, return on the previous file, fix it, re-generate, etc... No no no it's just insane xD .

The tracking is a bit awkward but it almost work fine, I just have to fix it and it should work much better.

pixxxelschubser
Community Expert
Community Expert
December 19, 2021

 

… I can say "if END OF PARAGRAPH, then apply a style X", but nothing related to a carriage return …


By @Nemesis666first

                                                                                     --> jump to quoted post

 

If I understand this correctly:

Instead of "end of paragraph", just try to format the last character before "end of paragraph".

e.g.

.(?=\r)

or

.(?=$)

or

.\r

or

.$

 

Very important:
Grep styles can only format characters but NOT replace them!

Nemesis666first
Inspiring
December 19, 2021

Hmmmm, in fact, you can, but its a bit complicated : i used the ligature system and created my own font made of symbols and/or letters to be able to do it 😛 .

 

Okay, so you think i cant do it with the   GREP Style system... Hmmmm. 

Nemesis666first
Inspiring
December 20, 2021

You can't replace characters with Grep styles, all you can do is change their appearance. This was mentioned earlier in this thread (see the red text).

 

is it more clear

Not really. Show us examples.


Yes, you can change their appearance, but if I remember well, if I create a custom ligature of "xyz" into an "abcd" set of characters, and I ask to GREP Style to search for "abcd", it will find "abcd" as it was the default text.

I dont remember, I used a website to create custom font with ligature system, I have to retrieve this site.

Peter Kahrel
Community Expert
Community Expert
December 18, 2021

Nemesis -- What exactly do you mean by 'I cant return to the line / carriage return'?

Nemesis666first
Inspiring
December 18, 2021

When I write "I cant return to the line / carriage return with this technic, since I can only write on one line of text", this mean, in a field of a database, you can only write a chain of characters, but "return to the line / carriage return" is/are not "character(s)".

I will try the technic of Peter K., thx Joel.

Peter Kahrel
Community Expert
Community Expert
December 19, 2021

I still don't understand wat you want, Nemesis. Please post an example of a paragraph that you want to target and what you want to do with it.

Joel used the F&R window only to demonstrate how \r and $ work. The expressions you use in the F&R window are the same as those that you use in the Grep style window.

 

Joel Cherney
Community Expert
Community Expert
December 17, 2021

You're looking for "Single-Line Mode" as described here in Peter Kahrel's GREP in InDesign. A query of (?s).+ will select everything in every line to the end of a story, even when it's the query in a GREP Style. I am actually aa bit surprised that it'll work for you, as I didn't expect a GREP Style defined in a paragraph style to continue affecting text after the end of the paragraph. But it absolutely does! 

Peter Kahrel
Community Expert
Community Expert
December 18, 2021

Hi Joel. It shouldn't, and doesn't when I tried. It may look as if it works if all the paragraphs in the story use the same paragraph style.

Nemesis666first
Inspiring
December 18, 2021

Indeed, I tested, and, I dont understand the "Single-line and Multiline" thing.

 


 

I can say "if END OF PARAGRAPH, then apply a style X", but nothing related to a carriage return.


NOTA BENE : I wrote "Style GREP" but it's "GREP Style" in the software in english, of course.