Want a free year on Tuts+ (worth $180)? Start an InMotion Hosting plan for $3.49/mo.
There are running headers in dictionaries, telephone lists, catalogues, guides and many other publications that need to inform the first and last instance of a list of terms on each page. That quick and useful way of finding words can be made with InDesign in a simple way, by uniting text variables with paragraph and character styles. Let's see how!
First of all we will create a running header for publications like a dictionary, that indicate the first word of each left page and the last word of each right page. On the example below the running headers (in green) indicate that Camel and Fox are the first and last words of the spread.
We could create each running header manually but that would take a lot of time. If you had to add new words or change the design, then you would have to remake all the work. To avoid that we will use a running header that uses variable text that can identify the first and last instances of a list of terms. In that case, if the terms in a page change, all running headers will automatically change accordingly.
Step 1 - Formatting the List of Terms
Create a paragraph style called "Term". Format it with your personal style. In my case I used a Myriad Pro font with a 12pt size, orange color and All Caps case. Apply the "Term" style on all the terms of your document list (dictionary words, catalogue items, phone names etc). Remember to separate the term from its description (if it has one) with a paragraph break.
Step 2 - Create the Variable Text
Go to Type > Text Variables > Define. This will open the Text Variables box. Click on the New button. On the New Text Variable box you will name the text variable as "First term". In Type choose "Running Header (Paragraph Style)". This is the variable type that creates a header based on the first or last instance of a paragraph style. In Style choose the paragraph style that we created for all terms, the "Term" style. In Use choose "First on Page". That means that this variable will recognize the first instance of a paragraph style on the page. Click on OK.
Step 3 - Options
You also have many options in this box such as adding text before or after the new variable (although you can just do that typing the text itself directly before or after a text box that contain the variable in a Master Page). You can also choose to delete the final end punctuation in case all your terms uses it and change the case used for the headings such as Upper Case, Lower Case, Sentence Case and Title Case (although you can also choose it by applying a paragraph style to the running headings themselves, that's up to your preference).
Step 4 - Creating the Other Variable
The next variable follows the same steps: go to Type > Text Variables > Define. On the New Text Variable box name the text variable as "Last term". Keep Type option as "Running Header (Paragraph Style)" and Style option with the "Term" style. But in Use option change "First on Page" to "Last on Page". This new variable will now pick the last term present on the page it's applied.
Step 5 - Insert Variables on a Master Page
At the Pages panel menu go to New Master and create a spread of Master Pages. Name the Master spreads "A-Term". On the left page of the Master Spread create a text box near the superior margin. We're going to insert our variable text in there. Now go to Type > Text Variables > Insert Variable and choose the "First term" variable that we just created. Alright. Now you have a working master spread that can be applied on the pages where you have your list of terms. You can also apply a different paragraph style to the running headers themselves, they don't need to have the same style that you used for the list of terms.
Step 6a - Adjustments
The Masters that were created can be applied in all the document pages. But, if the first page is an odd page there will be a problem: the page should indicate the first term but it will show the last. You can solve it manually, overriding the text box on the master page (Command + Shift + Click on Mac / Control +Shift + Click on PC). Or you can create a special master page for the first page such as "B-First Page". The same logic applies to the last page if it's an even page. On the example below the header should indicate "ALLIGATOR" but it's indicating "BEE" instead.
Another adjustment must be done if a term description from a previous page invades the current one. Normally the running header should indicate again the invading description's term but it can only recognize the first visible term on the page. You will have to change the headers manually in this case or make a Master Page design where the description of the last term never flows to the following page. In the example below the header is indicating "COBRA" although it should indicating the previous term.
Step 6b - Running Headers Made of Letters
Let's see now how to create a new type of running heading. It uses only the first letters of a term. For example, if a page starts with "COBRA" and ends with "FALCON" then the header will show "CO-FA" or "COB-FAL". To do this you will have to create a character style and nest it on the paragraph style used to format all term's instances.
Step 7 - Creating the Character Style
I assume you already have a list of terms formatted by a paragraph style. It can be the same "Term" style used before. Go to Character Styles panel and click on the Create new style icon or create a style by going to the panel menu and choosing the option New Character Style. Let's name this character style as "Char_Term". Don't worry about applying a font, color or any type of formatting to it. You can leave it blank since it won't be used to design your terms (that's already done with the "Term" paragraph style).
Step 8 - Nesting the Character Style
Now let's go to the Paragraph Styles panel. Click twice on the "Term" style or click on it once and choose Style Options on the panel menu. The Paragraph Style Options box will open. On the left menu click on Drop Caps and Nested Styles. On the Nested Styles box click on the New Nested Style button. A line with many editable lists will appear.
The Nested Style will be used to insert the character style in all instances of the "Term" style. To do that you must click on the "[None]" list and choose the "Char_Term" character style. Let the list "through" as it is. At the numbered box choose the quantity of characters that the running heading will contain. For example: "2" for a "AA-ZZ" heading or "3" for a "AAA-ZZZ" one. Then, select the last list and change "Words" to "Characters". Click on OK. Now all terms with the "Term" style will have a "Char_Term" character style through their first two or three characters.
Step 9 - Create the new variables
Go to Type > Text Variables > Define and create a new variable by clicking on the New button. The New Text Variable box will open. Name the variable "First_Char". On the Type option choose "Running Header (Character Style)". Select the "Char_Term" character style on the Style options. Then choose the "First on Page" option on Use. Click on OK. Create a new text variable, now with "Last_Char" as its name and with the same configurations, except that you must change the "First on Page" option to "Last on Page" on Use.
Step 10 - Create the Masters
Now create a master page and put a text box inside it. Insert in this box the text variable "First_Char" ( Type > Text Variables > Insert Variable ). Insert an hyphen after this variable by typing it like normal text. Now insert the "Last_Char" variable after the hyphen. Apply the master page on your document.
That's it! All your headings will show the first letters of the first and last terms of a page. Remember that you can format these headings appearance with their own paragraph style. It won't interfere with the variables.