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