Help - Showing outine place in header

G

Guest

I have formatted my dissertation with heading styles so as to show where in the argument I am. E.g.
Heading 1
Heading 2
Heading 3
Heading 3
Heading 2
Heading 3
Heading 4
etc.
Plus I've outline numbered each heading style.
I
A
1
3
B
etc.

What I want to do is to output both the number and text of the heading at the top of each page (in the header) but I only want it to show where in the outline one is as of the beginning of that page. So far what I've done is Insert, Field, StyleRef (Header 1 with paragraph # -- which outputs ONLY the outline number of the level -- then again without paragraph # to get the text).
So the code in the header looks like this:
{STYLEREF "Heading 1" \n \*MERGEFORMAT}. {STYLEREF "Heading 1" \*MERGEFORMAT}
{STYLEREF "Heading 2" \n \*MERGEFORMAT}{STYLEREF "Heading 2" \*MERGEFORMAT}
{STYLEREF "Heading 3" \n \*MERGEFORMAT}{STYLEREF "Heading 3" \*MERGEFORMAT}

Here's the problem (if you haven't already figured it out): I can't figure out how to make the output conditional to the point in the text I want referenced. For example, if I put the three heading levels in the header I get three levels on every page -- even the pages that aren't yet into the third level. If page 2 is only up to Heading 1 and Heading 2 levels, then I only want those to appear. I think I need to use an 'if' formula of some kind, but haven't been able to find any guidance about how to do this. Also, some fields that I initially thought promising (like monkeying with making an index or something) report that they are only usable in the main document. When I describe what I want to do, people say that it sounds like it should be pretty easy and straightfoward, but I'm having a devil of a time figuring it out.

Many thanks,

Ken
 
S

Stefan Blom

You have encountered a limitation of the STYLEREF field. A
work-around is to use dummy headings that are formatted
with hidden text in order to suppress display of the
undesired field levels.

Stefan Blom

-----Original Message-----
I have formatted my dissertation with heading styles so
as to show where in the argument I am. E.g.
Heading 1
Heading 2
Heading 3
Heading 3
Heading 2
Heading 3
Heading 4
etc.
Plus I've outline numbered each heading style.
I
A
1
3
B
etc.

What I want to do is to output both the number and text
of the heading at the top of each page (in the header) but
I only want it to show where in the outline one is as of
the beginning of that page. So far what I've done is
Insert, Field, StyleRef (Header 1 with paragraph # --
which outputs ONLY the outline number of the level -- then
again without paragraph # to get the text).
So the code in the header looks like this:
{STYLEREF "Heading 1" \n \*MERGEFORMAT}.
{STYLEREF "Heading 1" \*MERGEFORMAT}
{STYLEREF "Heading 2" \n \*MERGEFORMAT}
{STYLEREF "Heading 2" \*MERGEFORMAT}
{STYLEREF "Heading 3" \n \*MERGEFORMAT}
{STYLEREF "Heading 3" \*MERGEFORMAT}
Here's the problem (if you haven't already figured it
out): I can't figure out how to make the output
conditional to the point in the text I want referenced.
For example, if I put the three heading levels in the
header I get three levels on every page -- even the pages
that aren't yet into the third level. If page 2 is only
up to Heading 1 and Heading 2 levels, then I only want
those to appear. I think I need to use an 'if' formula of
some kind, but haven't been able to find any guidance
about how to do this. Also, some fields that I initially
thought promising (like monkeying with making an index or
something) report that they are only usable in the main
document. When I describe what I want to do, people say
that it sounds like it should be pretty easy and
straightfoward, but I'm having a devil of a time figuring
it out.
 
G

Guest

The problem with that workaround is that I would have to put a hidden heading for each heading level on every page before the first one of that level and then again after the next higher ranking level. Additionally, it would screw up the outline numbering format. I've got to think there's some way to do it with the 'if' field. I tried something like {If {PAGE}={PAGEREF {STYLEREF "Heading 3"}} {STYLEREF "Heading 3"} (for example). But this doesn't seem to give me anything (I get things like "Heading 3" printing out or just "}".) Even if this did work, I'd have to modify it to accomodate the pages after the Style appears but before the next one. I'd need a formula of some kind like
If Page>=Pageref (styleref "Heading 3") then styleref "heading 3" else null
(where >= is greater than or equal to)
Any ideas?
 
S

Stefan Blom

mrken said:
The problem with that workaround is that I would have to
put a hidden heading for each heading level on every page
before the first one of that level and then again after
the next higher ranking level.
I realize that it would certainly require a lot of work.
The question is, as always, if it's worth it!
Additionally, it would screw up the outline numbering
format.

This problem can be avoided if you use LISTNUM fields for
numbering rather than outline numbering. By not including
the field in your dummy paragraphs, numbering will be
correct.
I've got to think there's some way to do it with the 'if'
field. I tried something like {If {PAGE}={PAGEREF
{STYLEREF "Heading 3"}} {STYLEREF "Heading 3"} (for
example). But this doesn't seem to give me anything (I
get things like "Heading 3" printing out or just "}".)
The PAGEREF field requires a bookmark; that's why it won't
work with the text value produced by the STYLEREF field.

Stefan Blom

-----Original Message-----
The problem with that workaround is that I would have to
put a hidden heading for each heading level on every page
before the first one of that level and then again after
the next higher ranking level. Additionally, it would
screw up the outline numbering format. I've got to think
there's some way to do it with the 'if' field. I tried
something like {If {PAGE}={PAGEREF {STYLEREF "Heading 3"}}
{STYLEREF "Heading 3"} (for example). But this doesn't
seem to give me anything (I get things like "Heading 3"
printing out or just "}".) Even if this did work, I'd
have to modify it to accomodate the pages after the Style
appears but before the next one. I'd need a formula of
some kind like:
If Page>=Pageref (styleref "Heading 3") then
styleref "heading 3" else null.
 
S

Stefan Blom

mrken said:
The problem with that workaround is that I would have to put a
hidden heading for each heading level on every page before the
first one of that level and then again after the next higher
ranking level. Additionally, it would screw up the outline
numbering format.
I realize that my suggestion would require a lot of work...
(Maybe, in the end, you'll find that it isn't worth the effort.)
However, it doesn't have to mess up your outline numbering, since
you can use LISTNUM fields for numbering instead of outline
numbering. If you don't include any LISTNUM fields with the dummy
paragraphs, the numbering will be correct.
I've got to think there's some way to do it with the 'if' field.
I tried something like {If {PAGE}={PAGEREF {STYLEREF "Heading
3"}} {STYLEREF "Heading 3"} (for example). But this doesn't
seem to give me anything (I get things like "Heading 3" printing
out or just "}".)
The PAGEREF field requires a bookmark name, and STYLEREF returns
the text of a style, which explains why the above IF field
doesn't work.

Stefan Blom
 
G

Guest

I see what you mean about LISTNUM and hidden text. But like you said, this would end up being pretty onerous. You mentioned that the problem with the IF field is that PAGEREF is tied to a bookmark. Couldn't I do something like make a macro that would automatically put the text of a STYLEREF into a bookmark that anchored to the heading? (Isn't that essentially what TOC is already doing anyway?) Then shouldn't I be able to do if(page)>=(pageref(bookmark)) styleref "heading 3" ?
The problem then would be how to put the text of the bookmark into the pageref field. I think the answer is to use the TOC markers in some way.
Any other ideas?
thanks
 
S

Stefan Blom

I agree -- it does seem like a macro could do the job.
But, in order to find someone who can do the programming,
I think you have to ask this question in a VBA newsgroup.

Good luck!

Stefan Blom

-----Original Message-----
I see what you mean about LISTNUM and hidden text. But
like you said, this would end up being pretty onerous.
You mentioned that the problem with the IF field is that
PAGEREF is tied to a bookmark. Couldn't I do something
like make a macro that would automatically put the text of
a STYLEREF into a bookmark that anchored to the heading?
(Isn't that essentially what TOC is already doing
anyway?) Then shouldn't I be able to do if(page)>=(pageref
(bookmark)) styleref "heading 3" ?
The problem then would be how to put the text of the
bookmark into the pageref field. I think the answer is to
use the TOC markers in some way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top