Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Secret life of Character Styles and Running Headers

This is a tip I’ve been meaning to write-up for sometime? it ended up on the backburner with a lot of other tips and outstanding projects in the past couple of months?

Back in InDesign CS3 Text Variables were introduced. Amongst a number of other things we can use them to automatically generate running headers at the top of book or report pages, by placing a text variable placeholder on the master page that automatically inserts text formatted with a pre-allocated paragraph style.

Overview image, showing how a paragraph style applied to some text ends up in the running header.

In short: To define a new Running Header text variable: Type menu > Text Variables > Define… Select Running Header, then New… Once you’ve defined the style, Insert the variable in the placeholder area on the master page.

Generally running headers copy text formatted with a particular paragraph style into the running header text variable. However there are some situations where the link to a paragraph style might not work. For instance:

  1. what if you only want part of a header to be copied into the text variable placeholder OR
  2. what if you are using multiple paragraph heading styles (say heading 1, heading 2, heading 3) and you always want the first or last one used to populate the variable placeholder you’ve so nicely inserted on the master page?

This is when the hidden character style trick comes into play.

All you’ve got to do is create a character style that does absolutely nothing ;-) Yup, you heard it right? it does nothing? doesn’t apply any settings? it just exists.

character style that does nothing, and is named 'running header text'.

For the running header, change the Running Header (Paragraph Style) to Character Style and set the Style to the character style you created in the previous step.

Text Variable Edit dialog, with Running Header (Character Style) selected

Once that’s done, all you’ve gotta do is highlight the text you’d like to see in the running header and you’re cooking with gas ;)

Ooooh and what if you don’t want to manually apply the character style (as in case 2 above)? Apply the character style that does nothing to any of the heading styles (e.g. through using a nested style and you’ll never need to worry :)

paragraph style dialog box, nested style applied.

Tags
Related Articles
Comments

20 Comments on “Secret life of Character Styles and Running Headers

  1. Cari,
    Nice tip… I had a slightly different solution to the problem.

    I created a Paragraph Style, based on the style that was the one creating the variable text – that also did nothing. So any changes to the original style would still be reflected.

    One was called “Page Heading” and the other was called “Page Heading – NOT CONTENTS” – anything that I didn’t want to appear on the contents page (for example a really long page heading that looked messy in the contents page), got the second style.

    Another workaround I had was when I wanted to use abbreviations on the contents page, but the full text on the page heading – (for example – PPE & Personal Protective Equipment).

    The text I wanted on the contents page had the Page Heading paragraph style, and then a character style that removed the text colour. That object was sent to the back. The text I wanted on the page had the “NOT CONTENTS” style, and remained black.

    I’m not sure these are the best ways (I am still finding my way around CS5.5) but they worked for me!

    Thanks,
    Dan

  2. Hi Dan,

    Ha, funny how everyone develops their own little tricks to find their way around things that don’t quite work out of the box ;-)

    Think you can work with ‘non-printing-items’ as well for some of the samples you are giving. That way the text doesn’t accidentally appear within the content flow. I tested that ages ago, but from memory that works too :)

    Cari

  3. To automate the process, maybe a space at the beginning of the title would trigger that

    1. a grep style would apply a hor. Scale 0% to that space to make it disappear;
    2. and another grep style applying the character style “header-text”.

  4. You can also code a GREP Style into the Paragraph Style to apply a character style. If the character style is set to absolutely no info (leave blank) you can apply a character style that is picked up by the Text Variables.

    I had this for a publication with 8 running heads per spread.

    It came in handy.

  5. I used Running Headers & Footers in PageMaker but lost that ability with the upgrade to InDesign CS. So glad to InDesign has these now!

    LOVE all you awesome InDesign posters – thanks for the info once again!

  6. Thank, Cari!

    If only this would be possible while making a TOC! The problem is that TOC only accepts paragraph styles, not character styles.

  7. Here?s another trick for running headers especially if the header should be different (e. g. because the original one is too long). You can create a separated text frame position it on the pasteboard and anchor it right in front of the first line of the body text (under the heading). Now the text variable which lives on a master page can ?see? the text in the anchored text frame and will show it. Because the text frame is on the pasteboard it won?t print.

    Tipp: Use the possibility of object styles to reflect the spin. So you don?t have to worry on which page (odd or even) your heading starts and the text frame will always be offside the page.

  8. Is there a way to get the running header to reflect a change of style used in the source title? Some of my titles have a word or two in italics and this is not reflected in the running header (and I cannot select the header for those pages to make the change). Do I have to use a separate master page without the variable setting?

  9. I’m having a problem with running header text variable in InDesign CS4. 8 chapters. 200 pages.
    The text variable has worked very well taking the chapter title information for the running head text. Today I was looking at the whole file before printing it to pdf and discovered one running head text which is not the chapter title but rather the preceding title. When I move on to the next chapter (and throughout the remaining chapters in the book) the text of the running heads match with the chapter title. Where can I locate the gremlin that is causing this?
    By the way, I just discovered this possibility thanks to InDesign Secrets. Thanks Patricia McAdams

  10. Patricia, check for blank lines – just a single return – with your Running Header paragraph style assigned to it.
    It’s got to be one of the weirdest bugs in InDesign, as it gets mightily confused by this. I’ve even seen it pick up the header of several chapters before the last one.

  11. This problem can also occur in the following situation:
    - the running header is based on a character style;
    - the character style is applied not just to visible characters, but also to the end-of-paragraph character
    - the following occurence of the style does not comprise the end-of-paragraph character.

    In such circumstances, the latter occurence of the style is ignored and the previous is used.

    To avoid the problem, make sure that the end-of-paragraph character is _never_ assigned the running Header character style.

  12. I’m using InDesign Cs6. I have eight separate book files, all with the same verso running head, and the recto running head picks up a particular chapter title style, all set up in double-spread Master pages. Works fine in all my chapters except one. The recto running head appears only on the first page. Subsequent recto pages show the dotted box indicating the presence of the running head field, but no text appears. What can be happening?

  13. Yes, but none of you solve the main problem – there is no way to put character styles in the header. Like if I want to have one word in the header to be italic or red, there simply is no way to do that. It is an InDesign limitation and if someone has a good workaround for his I’d like to hear. PowerHeader… no, I don’t want to see my headers on body pages.

    Michael

  14. @Michael: Yes, power headers from in-tools gives you that feature. But what do you mean you don’t want your headers on your body pages? Isn’t that the whole point of headers?

  15. I resolved a problem I encountered with this technique and thought it might be useful to others. I was encountering an issue where after applying the character styles to part of a chapter heading the header remained blank. It turned out that when I included the hidden character that looks like a colon “:” in the selection of characters with the character style for the running header the header variable would not populate. However, when the character style was applied to the text only, excluding the “:” the issue was resolved.

  16. i created a book with 500 pages, i need to make autoflow running footer with the footter in curent pages is a first word in next page, is it possible to make it in indesign? i need help..

    Regards
    EIP

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>