RunningHeader variable: prevent display of a lower level paratag

Adobe Community Professional ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

For navigation purposes I like to have the main heading and the first subheading on a page display at the top of a page. 

 

My paragraph tags are defined as follows:

H1 Heading 1 is used for the chapter title

H2 Heading 2 is used for the main heading

H3 Heading 3 is used for the subheading

 

I use Running H/F variables to pull the text from the main heading and the subheading into the headers. 

Running H/F 1 is defined as: <$paratext[H2 Heading 2]>

Running H/F 2 is defined as <$paratext[H3 Heading 3]>

 

So far, all pretty standard. The issue arises when there's a new H2 Heading 2 on a page but there's no following H3 Heading 3. The header updates to use the new H2 Heading 2, but it's still using the information from the H3 Heading 3 that goes with the previous H2 Heading 2, and that's no good.

 

How do I get it to not do that? Or more precisely, if a new H2 Heading 2 is showing on a page that doesn't have a new H3 Heading 3 below it, how do I get the variable to be blank instead of showing whatever the most recent H3 Heading 3 text was? I can't be the only person this has been an issue for, so I'm sure a way around this has been found. I just haven't managed to turn it up yet.

 

Any pointers?

TOPICS
Formatting and numbering

Views

92

Likes

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
Adobe Community Professional ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

You might be stuck using Running H/F markers and some kind of scripting solution to insert blank ones where necessary.

Likes

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
Adobe Community Professional ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

Botheration. I had a feeling that was the case.

 

I guess what I'll do is create two new master pages without the secondary heading and apply them pre-publication. It's a nuisance.

Likes

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
Adobe Community Professional ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

I wonder if a clever way to do this is to have a secondary H2 Heading 2 paragraph format that indicates that no heading 3 follows it (H2 Heading 2_solo). Then you could use a master pages map to automate the application of the master pages.

Likes

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
Adobe Community Professional ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

<thoughtful> That could work. Or come to think of it, I have the Silicon Prairie Master Page tools, and I could just insert a Master Page marker in the heading. Either would work, but both require remembering that either the tag or the marker would have to be changed if at some future point subheadings wormed their way in.

 

I'll have to think about that.

Likes

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
Adobe Community Professional ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

Or if it is a larger, continous project, a script could be used to automate the process. The script would do something like this:

Encounter a H2 paragraph.

Navigate down and see if it finds and H3 before the next H2.

If not, put a blank Running H/F marker into the paragraph which will blank out the variable and that (and following pages).

This method would avoid multiple master pages and Master Page tools. If you want to investigate this, please send me a sample document. I will give you a quote with a massive discount :-).

Likes

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
Adobe Community Professional ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

LATEST

LinSims: Botheration.

You won't want to do this either. I had a similar problem on a recent project. But that project needed a spot cross-reference hack anyway, implemented as anchored frames with either simple text frame (aside headings), or text frame with tables in margins (everywhere else).

Three paragraph types were created: meta.header (picked up for headers), meta.footer (picked up for footers), and meta-data (xrefs). Minimum point size. Color: Authoring.

All of this was controlled by Color Views, so only visible in authoring.

In addition to providing control over carry-over, it also allowed the H/F text to vary from the actual Headings, which might otherwise be too long for auto-population of the H/F space available.

Likes

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