Chapter Numbers in a table of contents

Hi Experts,
I'd like to add a table of contents (TOC) including chapter numbers in my template. For example:
Table of Contents
1. Title
1.1 Sub-Title
1.1.1 SubSub-Title
To do so:
•     I created a template with a table of contents.
•     In the report body, I determine the chapter number using <?position()?>: <?xdoxslt:set_variable($_XDOCTX,’H1’, position())?>
•     Once the chapter number determined, I write it in the title: <?XDOXSLT:GET_VARIABLE($_XDOCTX,’H1’)?>.DEPARTMENT LEVEL: <?SUBNODE_NM?> - STORE: <?STORE_UNIT_ID?> on which I applied the heading style required
=>     When I launch the report, the chapter number appears correctly in the report body but not in the TOC. In the TOC, I only get the title chapter.
Any idea how I could do this?
Thank you in advance,
Sonia.

Hi Sonia,
You can directly use position() instead of storing in variables (Refer Template Builder for Word - TOC marker in foreach loop for an example).
But if you want to you variables for some other reasons, then use xsl context specific variables.
Instead of <?position()?>: <?xdoxslt:set_variable($_XDOCTX,’H1’, position())?> use
*<?variable@incontext:c1;position()?>*
and instead of <?XDOXSLT:GET_VARIABLE($_XDOCTX,’H1’)?>.DEPARTMENT LEVEL: .... use
*<?$c1?>.DEPARTMENT LEVEL: (formatted as Heading1).*
So on the whole it wold be similar to
<?for-each:group_name?>
<?variable@incontext:c1;position()?>
<?$c1?>.DEPARTMENT LEVEL:
Chapter contents
<?end for-each?>
Now update your TOC (right click -> update field).
Now you should be able to see the chapter numbers both in TOC and report body.
Hope this helps.
- Kavipriya

Similar Messages

  • Adjusting page numbering in the Table of Contents

    I have a question regarding adjusting page numbering in the table of contents. I have manually adjusted my page numbering to start at page 3, which is now called page 1. But my table of contents still show this page as page 3, while I want it to be shown as page 1.
    How do I do this?
    I tried to find an answer somewhere on this forum, but I couldn't find one. Neither could I find a solution in the help file.
    I hope you understand my question. I also included the document, which might be of help. Thank you!

    This answer assumes that your document uses the Default page style for physical pages 1-3. You are going to need two different page styles to accomplish what you want. (I'm guessing you have used a page number offset of -2 to get your physical page 3 numbered as 1 and this simply will not work in the TOC.)
    Put your cursor in the Title page (physical page 1) and open the Stylist (F11). Click the Page icon (4th from left) then click the New Style From Selection icon (2nd from right). Give it a name like 'Body'. Before you close the Stylist double click on Default just to make sure you did not change the style of the 1st page.
    While you are still on the 1st page click into the footer and remove the page number field assuming you do not want it.
    Put you cursor in the FIRST (1st) paragraph of the 3rd page and do **Format > Paragraph > Text Flow tab. In the Breaks section, check the Enable box, if not already checked, then check the With Page Style box, select the Body style from the drop down menu and set the page number to 1.
    If the page number field is still in the footer on this page then delete it and insert it again. It should now show 1.
    Click into the TOC, right click and select Update Index/Table.
    Just in case you have trouble translating this to your version of SO I have fixed your document and have attached it.
    * *To change to a new page style while writing your document do Insert > Manual Break > Page Break and select the new style. If you want a new page number you can check that box and set the new number.  

  • Create numbered list for table of contents 5.2.2

    Cannot change format in the table of contents to create a numbered list.

    So you cannot create a numbered list for the Table of Contents in iWork Pages 5.2.2.?
    You cannot make this:
    1.    Name of Chapter One.........................5
    2.    Name of Chapter Two.........................9
    You have to live with
    Name of Chapter One.............................5
    Name of Chapter Tow..............................9

  • I can't get the page numbers in my table of contents to update when I update the book.

    I'm using Framemaker 11 and I have two TOCs in my book: one in English and one in French. Each TOC links to different documents in the same book. The reference page for each TOC is set and correctly displays the heading 1 and 2 I've told it to display, but the numbers do not update when the content in my document files changes to a different page. I've checked the conditional text settings in my document files; they are correct. When I update the book, I choose to update Numbering, All Cross-References, All Text Insets, OLE Links, Generate Table of Contents, Lists, and Indexes. What am I doing wrong? Thanks.

    I just tested this out and saw the same result as Rick - a book with child books ignores all generated files within the child books. This applies to adding content from them (e.g. their titles) to actually including them in the output. This applies to all versions of FM since v.9!
    However, there is a workaround for this. You need to use the hierarchical book structure in the parent book and create Folders for each book that you want to add. Then manually add the generated files (TOC, IX, List of..., etc.) and book to the respective folder. This is what it looks like for two child books in a parent book:
    Note that the child book generated files (TOC, IOR) show as just regular files at this point in the parent book. To get the page numbering to be continuous throughout the parent book, you will need to make a couple of passes. First set folder, files and books to have the Numbering continue from the previous (if you want all sequential page numbers). This will set the page numbers correctly except for what they were in the respective book TOCs. You will need to use the starting page number of the child TOC files in each folder (it shows in the Book status bar when click on the TOC file in the master/parent book).
    To set the individual book TOCs to be correct in the parent book, open the child book and set the TOC Numbering to start at the page stated in the parent book (status bar). Now update the child book to set the correct (parent book) page numbers in the child TOC. [This is a necessary manual step, as the page number assigned in the parent book is ignored when th child book is individually updated and FM uses 1 to start off the sequence in the child book.]  Repeat for each child book in the master/parent book.
    The final step is to Update the parent book and create the PDF. You should now have all of the files included in the PDF and the child TOCs should show the correct page numbers of the master book.
    This whole process of books within books seems a bit borked and one shouldn't have to be jumping through hoops to include child generated files. Please report this as a bug via: https://bugbase.adobe.com/index.cfm

  • How do I update only the page numbers of a table of contents in Indesign CS6?

    Hi there!
    Please help! I'm making a medical book with more then 1300 pages and about 40 different table of contents.
    I want to update only the page numbers on all the table of contents. But I only see the option to update the complete table of contents.
    I saw on other forums that this is a familiar and very old problem. Did Adobe already fixed this?

    hahaha thanks no I won't Using cross-references in the future! but sending the request anyway; nothing ventured, nothing gained!
    Thanks again!

  • How best to include additional on-page info (*as well as*) page numbers in a Table of Contents?

    Hi all -
    I'm creating a directory / listings document. At the end of the publication, I need to create a "quick reference" section - with an alphabetised listing of each entry, some key info from each entry, and the page number for each entry.
    I've created a unique paragraph style for each of the lines that I need to include here - so the Table of Contents is picking them up successfully.
    However, I'm struggling to style the outputs of the Table of Contents the way I need: I want a tab between each of the included paragraph styles that are returned for each entry, and then a line return at the end.
    So…
    First Hotel name -> Star Rating -> Number of Bedrooms -> etc etc
    Second Hotel name -> Star Rating -> Number of Bedrooms -> etc etc
    Instead of…
    First Hotel name
    Star Rating
      Number of Bedrooms
       etc
    Second Hotel name
    Star Rating
      Number of Bedrooms
       etc
    Any suggestions?
    One important point to note - I'm using CS5.5… an upgrade is in my future, but I want to finish this project first! (Don't want to switch mid-stream.)
    Thanks!

    Thanks. I went there and bulleted align by decimal, but it didn't work on the page. For one thing, when I highlight that page, for some weird reason the numbers from 9 up DO NOT HIGHLIGHT. !  Only the text following those numbers highlight, altho all the other numbers and text following 9 highlight!
    Don't know why it would have this weird situation! Seems like a flaw in the design.
    I tried moving the little blue cursors above, but I'd need to move it half a step either way to bring those one-digit number decimals in alignment with the rest. For some reason the cursors will ONLY move a full step! So they're out of alignment no matter what I do. Darn!
    Kristen
    gemsandbeyond at aol dot com

  • Can I show outline numbering in a table of contents?

    I am using an outline to put together a reference book.  This is hte format I'm using:
    A. Law and Justice
         1. Law of the Land
              a. Example
              b. Example
         2. Law Publication
              a. Example
              b. Example
    B. Government and Civil Officers
         1. Requirements for Civil Leaders
    However, the table of contents shows, "Law and Justice" instead of "A Law and Justice"  It also does not show the second level number.  For example, it shows "Law of the Land" instead of "1. Law of the Land".  Does anyone know how I can force the table of contents to show the numbering?
    Thanks!

    Pages T.O.C. does not include any List numbering and no you can not force it to.
    If you want numbering, you'll have to type it manually.
    Or use alternative software. Pages (whatever version you are using) is not compulsory.
    Peter

  • Find/Change Item Numbers and create Table of Contents

    Hello! I need help to find all my item numbers and apply a paragraph style to it so I can use them to create a Table of Contents page.
    Sample item numbers
    #12345
    #12345-5
    #12345-20
    #12345-ABC
    #12345/N
    I tried entering #^?^?^?^?^? on the Find/Change box and but this will find exactly the 5 characters after the # sign. I wonder if you can find all characters starting with # and until the last characters.
    Once I find all the item numbers, how can I apply the paragraph style for only those characters after the # sign? Because I only want to show the item numbers without the # sign on the Table of contents/Index page.
    By the way, I have InDesign CS2 which have no GREP function Maybe I can do this without the GREP?
    I really appreciate any help. Thank you very much.

    You actually have two problems here. The first is to assign the paragraph style. For that you can use GREP.
    Find #\d+ and leave the change field blank, but in the change formatting pick the paragraph style. Stricly speaking you only need to find #\d or even just # because a paragraph style applies to an entire paragraph, so assigning it to any character inthe paragraph will assign it to the entire paragraph.
    Which is your second problem. The TOC is based on paragraph styles and will include all of the text in each paragraph (up to the character limit for a TOC entry, which I think is 256 characters). You can't make a TOC and only use some of the paragraph. For that you need to use an index, or you need to make hidden or non-pinting frames with only the exact text you want in the TOC and assign a unique style to those.
    It's also possible someone has written (or could write) a script that can find text strings that match a pattern such as your numers, assign a character style to them (you could actually do that part in the paragraph style by adding a nested GREP style), then making a list of the text strings along with the page number on which they appear -- almost the same as an index except it would be based on character style, not an index marker.

  • How to pick up chapter numbers in TOC headings?

    Each new chapter heading is in a one-row, two-column table. Column 1 contains only a large number (numbered style called ChapNum) against a shaded background, and column 2 (unshaded) contains the chapter title (Heading1 -- which is NOT numbered; only the style in column 1 contains numbering.)
    The only exceptions are the Preface chapter (a Heading1) and the TOC itself (which uses TOCTitle so it won't appear in the TOC). For both, the shaded column 1 uses a style called ChapNoNum.
    Page layout has sideheads; first page of each numbered chapter looks similar to this:
    |-----|--------------------------|
    |     |                          |
    | 1   | Heading1                 |
    |-----|--------------------------|
    |     | text text text text text |
    |     | text text text text text |
    |     | text text text text text |
    |     | text text text text text |
    I want the TOC to pick up the chapter numbers like so:
    |-----|--------------------------|
    |     |                          |
    |     | TABLE OF CONTENTS        |
    |-----|--------------------------|
    |     | Preface...............1  |
    |     | 1. Getting Started....3  |
    |     | 2. More Stuff.........5  |
    |     | 3. Troubleshooting....9  |
    But the TOC picks up only the Heading1s, which aren't numbered. How to include the ChapNum in front of the Heading1 in the TOC? (I've tried using graphic boxes on master pages instead of the table rows on the body page but haven't found the answer there.)
    Any help is most welcome.
    Gay (FM 9.0, non-structured)

    Gay Alson wrote:
    Each new chapter heading is in a one-row, two-column table. Column 1 contains only a large number (numbered style called ChapNum) against a shaded background, and column 2 (unshaded) contains the chapter title (Heading1 -- which is NOT numbered; only the style in column 1 contains numbering.)
    The only exceptions are the Preface chapter (a Heading1) and the TOC itself (which uses TOCTitle so it won't appear in the TOC). For both, the shaded column 1 uses a style called ChapNoNum.
    Page layout has sideheads; first page of each numbered chapter looks similar to this:
    |-----|--------------------------|
    |     |                          |
    | 1   | Heading1                 |
    |-----|--------------------------|
    |     | text text text text text |
    |     | text text text text text |
    |     | text text text text text |
    |     | text text text text text |
    I want the TOC to pick up the chapter numbers like so:
    |-----|--------------------------|
    |     |                          |
    |     | TABLE OF CONTENTS        |
    |-----|--------------------------|
    |     | Preface...............1  |
    |     | 1. Getting Started....3  |
    |     | 2. More Stuff.........5  |
    |     | 3. Troubleshooting....9  |
    But the TOC picks up only the Heading1s, which aren't numbered. How to include the ChapNum in front of the Heading1 in the TOC? (I've tried using graphic boxes on master pages instead of the table rows on the body page but haven't found the answer there.)
    Any help is most welcome.
    Gay (FM 9.0, non-structured)
    TOCs capture only specified paragraph formats. Your chapter numbers aren't specified in the TOC, so they're not captured. To capture both the number and the title paragraphs, you need to specify both formats in the TOC set-up. To make the number run into the title, you'll need to assign a run-in paragraph format to the number's entry in the TOC; this will cause the title to follow the number on the same line.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Microsoft Word-Table of Contents-Update Page Numbers

    I am having trouble updating my page numbers within the Table of Contents in a Microsoft Word document. On a Windows machine, I would click to the left of the table and then click F9. On an Apple, that adjusts the brightness of the screen or modifies the screen if I accompany the F9 with the Apple or Function button. Does anyone know how to update the page numbers without creating a new Table of Contents?
    Lisa

    In Mac OSX it is possible to change or create keyboard shortcuts for all applications as well as the system itself.
    Go to +System Preferences > Keyboard and Mouse > Keyboard shortcuts+
    Select the menu item for whatever application, in this case Dock, Exposé and Dashboard, click on the keyboard shortcut and change it to whatever you would like.
    It will then work the next time you launch the application. If it is a menu item the name of the shortcut must match the menu name exactly.

  • Word to PDF does not keep hyperlinks in Table of Contents ?

    I have used my free trial of Adobe CreatePDF before purchasing the annual subscription.
    I was surprised to see that the PDF document did not keep the clickable hyperlinks that Word uses in a Table of Contents. As this is the exact same behaviour as the "Save as PDF ..." option that I have natively available on my computer I don't see the point of paying a subscription to the service. Or am I doing something wrong?
    MAC OS X Lion (10.7.2)
    Office for Mac 2011
    150-page .doc document with Section, Chapter, and various Heading Styles defined
    WORD automatically-built Table of Contents
    In the WORD document, the page numbers in the Table of Contents are hyperlinks to the concerned page
    Convert WORD to PDF using "Save as PDF ..." option in the "Print..." dialog box
           ====> Table of Contents hyperlinks are not preserved (the page numbers are no longer clickable)
    Convert WORD to PDF using Adobe CreatePDF
           ====> Table of Contents hyperlinks are not preserved (the page numbers are no longer clickable)
    Am I missing something or is this the way it is intended (not) to work?
    P.S.: I know that, on the MAC, I can use Preview to manipulate the PDF document I obtain through "Print..." > "Save as PDF...". One of the things I can do is to select the page numbers in the Table of Contents and add a 'link' to each. But this is a VERY cumbersome process. Actually, I have to create a link for each page number, one at a time, on a table of contents that may consist of in excess of 50 entries. As I have a collection of 50-odd documents and am on a schedule of distributing new versions every two weeks or so, this procedure is completely unusable. Hence my search for a (paid) service that converts my documents while preserving the hyperlinks of the Word-created Table of Contents. Either I am doing something wrong or such service does simply not exist ...

    Good day fgrexsg,
    You are correct in that the workflow you described will not produce links in the resulting PDF files.  The steps that Lori outlined work great if you're working on Office for Windows in terms of getting the links to work when converting using the CreatePDF service. 
    In order to make this work on the Mac, you'll have to take a few extra steps within Office first.
    You're going to have to repeat this step for each item in your TOC.  While this will be time-consuming for a 150-page document, it will work.
    Within your TOC, highlight the entire entry listing (e.g. Topic 1.........3)
    Once the entire line is highlighted, choose Insert > Hyperlink
    Click 'Document' to select a location within the current document.
    Under the 'Anchor' option, either type in the Heading/Sub-heading (must be exact) of the page you want the hyperlink to attach to or click 'Locate' and find the proper Heading/Sub-heading within the structure.
    As I said, this will probably be time-consuming on such a large document, but it will work. 
    Unfortunately Office for Mac just simply isn't as full-featured as its Windows counterpart.
    Please let me know if you have any questions.
    Kind regards,
    David
    Acrobat Community Manager
    Adobe Systems

  • Table of contents links that work in Professional don't work in Reader

    I use Adobe Acrobat Professional Version 8.2.2 to create PDF
    documents from Microsoft Word 2007 files. The main table of contnets, as well as mini-ToCs at
    the beginning of each chapter, are linked to the section headi
    ngs.
    I've just discovered that the links no longer work when the documents are are opened in Reader Version 9.3.2.
    Can you suggest a solution?

    The topics and page numbers in the table of contents of a document are linked to the referenced headings. The links work when I test them with Acrobat Professional.
    In Acrobat reader the links don't work.

  • Creating PDF with links in Table of Contents

    How do I convert a Word file (in which the page numbers in the Table of Contents are links to their corresponding headings) to a PDF file so that the page numbers in the Table of Contents are still liinks to their corresponding headings?  I am working with Adobe Acrobat 9 Pro.  Thanks!

    Hmmm. I hadn't heard of this limitation. Indeed, http://www.pdfa.org/2011/08/pdfa-–-a-look-at-the-technical-side/ says "With regard to hyperlinks, the special ‘Link’ annotation type is permitted with or without activated ‘Appearance’. "  Maybe this document is being generated with a different kind of annotation.

  • Citing Markers in the Table of Contents

    I have created a document with a Running Header/Footer variable and a Marker1 definition in the master pages. The paragraph style for the Running Header/Footer is "Chap". I would like to recall this tag so that it appears in the table of contents. When I try to reference it in the table of contents by using the "Chap" tag, nothing happens.
    My question is: Is there any way to pull the data from the marker variable as a "Chapter Title" into the table of contents. If so, how?
    Thanks a million!
    Hill

    OK, Hillary, is "Chap" the name of the para tag that is only in the header of the master page?
    Or is it the name of the para tag in the text flow that formats the name or number of the chapter?
    If the former, it'll never show up in the TOC because it only exists on a Master page.
    To be listed in the TOC, the tag needs to be in the main text flow.
    Most of the time, when people set up a book file, would use one tag to format the chapter title. Then they would include the name of that tag when they set up the TOC. To put the name of the chapter in the header or footer, you'd format a Running H/F 1 (or any other number) so that it contains a string like <$paratext[ChapterTitle]>
    Art

  • Split a Table of Contents on two pages

    Hi everyone!
    I would like to split a Table of Contents on two pages after my own wishes. Is it possible? I know that the TOC can be styled but make it split over 2 pages seems impossible. Does anyone have an idea? Thank you for any input!!!

    Thanks for the feedback.
    It's not my idea.
    It's a variant of what Apple explains in the technote:
    http://support.apple.com/kb/TS2127
    Symptoms
    +When you create a document in Pages, you can add page numbers to your pages, and even choose a numbering format (such as 1, 2, 3; A, B, C; or I, II, III). If you create a table of contents (TOC) for your document, the TOC will always display page numbers as Arabic numerals (1, 2, 3), even if you selected a different format for your page numbers (such as if you chose the letter scheme A, B, C).+
    +If your page numbers are not Arabic numerals, your document may be difficult to navigate since the TOC and page numbers won't match. As a general rule, you should use Arabic numerals to number your pages if you plan on including a TOC so that the TOC will reference page numbers correctly.+
    Resolution
    +If you've used a different numbering format, you can edit your TOC using this workaround:+
    _+Export your document as an RTF (Rich Text Format) document (from the File menu, choose Export, then select the RTF radio button in the resulting dialog).+_
    _+Open the RTF in Pages (from the File menu, choose Open or drag the RTF file onto the Pages icon in the Dock).+_
    _+Manually change the numbers in the Table of Contents section so that they match your page number scheme.+_
    _+Please note that some of your formatting may change during this process and may need to be corrected.+_
    Yvan KOENIG (from FRANCE jeudi 12 mars 2009 20:44:24)

Maybe you are looking for

  • Open Billing doc.in VF05

    Hi, We have created some Invoices in period 01/05/2011 to 10/05/2011 for acoounting document has not been cleared for payer X. When we are taking the report for open billing document in VF05 for that payer for that period system is not showing any va

  • Can't install Acrobat 8.1.2 on Leopard

    Hi, I can't use Acrobat 8 with Leopard and in an attempt to fix the problem I can't install the fix patch. When it asks for an application then the Distiller and Acrobat Pro applications are 'greyed out' Please Help!! Chris

  • Imac won't get past boot screen

    I have never had a problem with my mac, but recently I was surfing the internet, and the screen seemed to freeze.  I powered it off by holding the power button until it turned off, then tried to turn it back on.  the apple screen came up, then the ro

  • How do I see the numbers I texted on my verizon?

    I have a prepaid iPhone plan. Im the only number on the account, and the acct owner. I need to see the numbers I texted/ texted me at certain times and when I go to usage the number fields are left blank? Thank you so much for your time and God bless

  • Need help  - Ethernet question for DSL

    Hi, hoping someone can help me. We are looking into getting Verizon DSL internet, and don't know if we have the Ethernet specifications. We have a flat screen 17" iMac 1Ghz, Dh said he knows we have an ethernet connection but doesn't know about the c