Creating two TOCs - one for style 1 and another for style 2

jmt356
SilverLounger
Posts: 2389
Joined: 28 Mar 2010, 01:49

Creating two TOCs - one for style 1 and another for style 2

Post by jmt356 »

In my document, each chapter begins with a word in English followed by a tab followed by the same word translated into a foreign language. I want to create one TOC with just the words in English and another with just the words in the foreign language. I thougth I could do this by putting the words in English in Heading 1 and the words in the foreign language in a new style based on Heading 1 called Heading 1-AR, and then create one TOC, using TOC \h \z \t "Heading 1,1" and another TOC using TOC \h \z \t "Heading 1-AR,1"

However, I am running into a problem. While the first TOC is correctly only putting in the items with the Heading 1 style, the second TOC is putting in both the items in Heading 1 and Heading 1-AR. How do I correctly filter out the items in the Heading 1 style?

If using alternative heading names is not the best way to do this, please let me know of any other ways to do it.
Regards,

JMT

User avatar
StuartR
Administrator
Posts: 12605
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Creating two TOCs - one for style 1 and another for styl

Post by StuartR »

Are both of these styles Paragraph styles?

If they are then you can't separate them with just a tab, if not then I don't think you can use them to create a TOC.
StuartR


User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Creating two TOCs - one for style 1 and another for styl

Post by HansV »

Build the chapter headings like this:

Start a new paragraph.
Set the style to Heading 1.
Type the English text followed by a tab.
Press Ctrl+Alt+Enter to insert a style separator.
Set the style to Heading 1-AR.
Type the foreign language text.
Press Enter.

Your TOCs should now work correctly.
Best wishes,
Hans

jmt356
SilverLounger
Posts: 2389
Joined: 28 Mar 2010, 01:49

Re: Creating two TOCs - one for style 1 and another for styl

Post by jmt356 »

What a neat trick!

Stuart, you mean I can't have two different styles in the same paragraph? So are the two styles Pseudo styles that look like paragraph styles but act like character styles? Because I can see that when the cursor is on the first word, "Heading 1" is the paragraph style displayed; when the cursor is on the second word, Heading 1-AR is the paragraph style displayed.
Regards,

JMT

User avatar
StuartR
Administrator
Posts: 12605
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Creating two TOCs - one for style 1 and another for styl

Post by StuartR »

jmt356 wrote:...you mean I can't have two different styles in the same paragraph?...
The only way to have two paragraph styles in the same paragraph is if you have a style separator in between them.

If you apply a paragraph style to part of a paragraph then it just applies the character attributes of that style to the selected characters.
StuartR