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

Running Header

Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

I need to create running headers from the first instances of Bible reference on each page of a book I'm working on. The trick is that I don't want to include any dashes or semicolons or anything after them in my running header. In the case of the screenshot example, I would want my running head to just read "Matthew 1:30". I'm assuming this is going to take a grep style, but admittedly my grep coding skills aren't very good. If someone could point me to the solution it would be much appreciated! After solving this, I will need to do the same with the last reference on right-hand pages.

 

setho77557739_0-1675276680844.png

 

TOPICS
How to

Views

1.0K

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Feb 01, 2023 Feb 01, 2023

And some more testing...

Part of the problem seems to be the .+, so I've changed that to \w+ and the \s seems to be the other problem, so I've changed that to a typed space, so the new expression, whch seems to work now, is ^(\w+? )+\d+:\d+

Votes

Translate

Translate
Community Expert ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Try using this expresion to assign a GREP style:

^(.+?\s)+\d+:\d+

It should find any one or more words at the start of a paragraph followed by a space and then any number of digits a colon and more digits.

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Thanks for your help. I don't know why that's not working for me.

Votes

Translate

Translate

Report

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

What happens when you try it?

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

When I try it in Find/Change, it just says "cannnot find match".

Votes

Translate

Translate

Report

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Are you sure you're in the GREP tab? Not set to find in a selection? It worked OK in my test...

Votes

Translate

Translate

Report

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

And did you try it as a GREP Style? You can create a character style that has only a name, no attributes, to use to set up the variable.

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Yeah, I did change the visual appearance of the style just for testing purposes. No go.

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

positive

Votes

Translate

Translate

Report

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Can you post a screen capture of the Find/Change dialog, please.

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

setho77557739_1-1675284851483.png

 

Votes

Translate

Translate

Report

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

OK, this is REALLY wierd.

I did some more testing in both CS6 and in CC 2021 which both happen to be open at the moment on my machine. In both cases the GREP works if there is a single paragraph in the story using Find/Change, but not if there are multiple paragraphs, and as a GREP style it works for the first three of 4 in CS6, but only the first two in CC 2021.

 

I'd like to hear from some of the GREP experts...

Votes

Translate

Translate

Report

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

And some more testing...

Part of the problem seems to be the .+, so I've changed that to \w+ and the \s seems to be the other problem, so I've changed that to a typed space, so the new expression, whch seems to work now, is ^(\w+? )+\d+:\d+

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

You're a genious, Peter! Thanks!

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Now if I could just get it to apply to my running header variable... Doesn't seem to want to work.

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Someone else posted a couple years ago that you can't use grep styles in a running header like that. I'm guessing that hasn't changed. Too bad. I guess it would have to be done via find/change after flowing the full document.

Votes

Translate

Translate

Report

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Ah yes. GREP styles don't show up as character styles directly. You'll have to use Find/Change to assign the style, but as I said earlier, you can create that style as just a name so it doesn't affect the formatting in your body text.

If you need to format the whole biblical reference as italic, which seems to be the case, I think you'll need to do THAT part as a GREP style (essentially the reverse of what's intuitive here). I think you can use ^.+\d to do that

Votes

Translate

Translate

Report

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
Explorer ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Now you're thinking ahead of where I'm even at with the project! Good stuff. I don't know yet if I'll need to format the references separately, but there's a high likelyhood I will. Thanks again for all your help.

Votes

Translate

Translate

Report

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

You're welcome. This one was a lot of fun.

Votes

Translate

Translate

Report

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
Guide ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

LATEST

Taking a look at the sample screenshot:

 

^\w+[\h\d:;-]+\d

 

Capture d’écran 2023-02-02 à 10.59.02.png

 

(^/)  The Jedi

Votes

Translate

Translate

Report

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