Share via

Styleref referencing previous chapter

Anonymous
2024-01-16T11:48:31+00:00

Hi, I am trying to have different odd and even pages in my doctorate's headers, 1 for styleref 1 and one for styleref 2. I make sure to start style 1 on even pages to prevent having the styleref2 on a new part, but I cannot get around having the previous part styleref2 if what I write under styleref1 is longer than 1 page. To be more precise my header of even pages is Styleref1 that is for the name of the part, odd pages are for styleref 2 which is for the name of the chapter under the part. So if I start Part II and write an intro of more than one page, on my odd page I will have the name of the last chapter of Part 1... drives me crazy

Microsoft 365 and Office | Word | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-01-21T19:08:23+00:00

    As you have found, the STYLEREF field looks for the style that you have specified. The field isn't clever enough to take into account other chapters or parts of a document.

    Sometimes, you can work around the limitation by adding a character style to the mix. A character style can be applied selectively to some of your headings and you can then reference the character style with a STYLEREF field to get some more control over which text paragraph will be displayed. Of course, such as character style should not be used to modify the text. It is only created to be referenced. See http://wordfaqs.ssbarnhill.com/StyleRef.htm.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-01-21T11:22:53+00:00

    Hi Sean,

    I am not sure that your answer fits with my issue:

    • I don't have different style ref on one page, but different style ref per odd and even pages. Even pages show STYLEREF "Heading 1" and odd pages show STYLEREF "Heading 2". So I have the part one one page, and the chapter on the next one.
    • The problem is not with a chapter starting with another one in the same page, but with the chapter (Style ref 2) starting 2 pages after the new part (style ref 1) and therefore the odd page will show the name of the chapter of the previous part. I guess it is because it is looking up for the style ref 2, but even if I ask it to look down, since it is not on the same page it does not take it into account.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-01-17T07:12:27+00:00

    Dear Yael Aberdam

    Thank you for posting in the Microsoft Community. We will be happy to help you.

    • Make sure you have applied the correct style to the chapter and verse numbers in your document. You can use the Reveal Formatting pane (Shift + F1) to check the style of any text.
    • If you have multiple STYLEREF fields on the same page, you may need to use the \l switch to specify the level of the style you want to reference. For example, if your chapter style is Heading 1 and your verse style is Heading 2, you can use { STYLEREF 1 \l 1 } for the chapter number and { STYLEREF 1 \l 2 } for the verse number.
    • To avoid repeating the chapter number when it is the same as the previous page, you can use the \n switch to suppress it. For example, if you have { STYLEREF 1 \l 1 }-{ STYLEREF 1 \l 2 } on the first page and { STYLEREF 1 \l 1 \n }-{ STYLEREF 1 \l 2 } on the second page, it will show 1:20–35 instead of 1:20–1:35.
    • To avoid showing the wrong chapter number when a new chapter starts on a page with text from another chapter, you can use a bookmark to mark the start of the new chapter and then use a REF field to reference it. For example, if you insert a bookmark named Chapter2 at the beginning of chapter 2, you can use { REF Chapter2 }-{ STYLEREF 1 \l 2 } instead of { STYLEREF 1 \l 1 }-{ STYLEREF 1 \l 2 }.

    I appreciate your patience and understanding and appreciate your time and cooperation.

    Sincerely

    Sean | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments