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

How to make InDesign choose the actual 1st word in required style when using Running Head (Character style)

New Here ,
Aug 09, 2015 Aug 09, 2015

Copy link to clipboard

Copied

I need to have a running header with the first word in a required style. However, when I choose Running Head (character style) and choose "the 1st on page", it finds the first paragraph on page and if the paragraph is not whole (started on the previous page), it takes the first word from that paragraph. For example:

Výstřižek.PNG

I need the running header to show the word "Quis", which is the first word in Open Sans Bold. Instead, InDesign shows the word "Lorem" in the red text field.

Is it possible to create a script that will make InDesign unsee the first paragraph on page, if it is not whole when creating a running header?

TOPICS
Scripting

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 , Aug 10, 2015 Aug 10, 2015

1. Set up the running-header variable to use a character style, first on the page.

2. Apply the character style to the first word of all or selected paragraphs with a GREP find/replace: find ^\w+ (or whatever grep expression is the more appropriate), make sure the replace field is empty, and set the character style in the Change Format panel.

This is the way to do it because (1) running-header variable doesn't see GREP styles, and (2) though running-header variables do see nested styles, you get t

...

Votes

Translate

Translate
Community Expert ,
Aug 10, 2015 Aug 10, 2015

Copy link to clipboard

Copied

1. Set up the running-header variable to use a character style, first on the page.

2. Apply the character style to the first word of all or selected paragraphs with a GREP find/replace: find ^\w+ (or whatever grep expression is the more appropriate), make sure the replace field is empty, and set the character style in the Change Format panel.

This is the way to do it because (1) running-header variable doesn't see GREP styles, and (2) though running-header variables do see nested styles, you get the same problem as what you already saw, namely, that 'first on the page' can in fact on the previous page.

Peter

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
New Here ,
Aug 10, 2015 Aug 10, 2015

Copy link to clipboard

Copied

LATEST

It's working. 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