Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

GREP for Titles

Community Beginner ,
Jan 27, 2017 Jan 27, 2017

Hello!

My name is Dumitru.

I work on design on books, and thus trying for a while to compose a GREP for subtitles to ease mai work load, but no success.


I have the Paragraph Styles and I can do the Character Styles for these subtitles with no dot “.“ at the end of them, of course.

I believe all my best was: ^[\(\u+\l+\d]\.\)+r but it did not work. At least I figured I need one GREP for each subtitle, because my subtitles are all different!

Examples of what subtitles I need is this:

  • Body text.... body text...body text...

          subtitle: I. subtitle

         Body text.... body text...body text.

  • Body text.... body text...body text...

          subtitle: A. new subtitle   

          Body text.... body text...body text.

  • Body text.... body text...body text

          subtitle: 1. new subtitle

          Body text.... body text...body text.

  • Body text.... body text...body text

          subtitle: a. new subtitle

         Body text.... body text...body text.

  • Body text.... body text...body text

          subtitle: 1) new subtitle

         Body text.... body text...body text.

 

  • Body text.... body text...body text

          subtitle: a) new subtitle

         Body text.... body text...body text.

 

  • Body text.... body text...body text

          subtitle: (1) new subtitle

         Body text.... body text...body text.

 

  • Body text.... body text...body text

          subtitle: (a) new subtitle

         Body text.... body text...body text.

I felt I am close but I just could not make it. So, I said I will ask people who really know this otherwise wonderful function of InDesign, GREP.

Thank you.

377
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 27, 2017 Jan 27, 2017

If I understand your setup, you could do this with Paragraph Styles, each having the next set up as Next Style.

You can then select the whole thing, right-click on the Style that comes first, and choose Apply {style} then Next Style.

As long as your paragraphs follow a predictable pattern, you can style the whole thing at once.

Screenshot 2017-01-27 16.42.43.pngScreenshot 2017-01-27 16.41.01.png

Screenshot 2017-01-27 16.43.56.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 27, 2017 Jan 27, 2017
LATEST

Dumitru,

What you seem to need is Grep find/replace to apply para styles to paras with no period at their end and a specific numbering at their beginning.

If right, I suggest you to play with auto-numering para styles!

If manual numbering, here're find requests:

Find: ^[A-Z]\.\h.+[^.]$

Replace by format: A._ParaStyle

Warning: maybe interferences with next one!

Find: ^[IVX]+\.\h.+[^.]$

Replace by format: I._ParaStyle

Find: ^\d+\.\h.+[^.]$

Replace by format: 1._ParaStyle

Find: ^[a-z]+\.\h.+[^.]$

Replace by format: a._ParaStyle

Find: ^\d+\)\h.+[^.]$

Replace by format: 1)_ParaStyle

Find: ^[a-z]+\)\h.+[^.]$

Replace by format: a)_ParaStyle

Find: ^\(\d+\)\h.+[^.]$

Replace by format: (1)_ParaStyle

Find: ^\([a-z]+\)\h.+[^.]$

Replace by format: (a)_ParaStyle

To avoid real styling problems (and if right!), I'ld use conditions too [see later!]

(^/)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines