Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-21878

TOC in pdf export only uses pagetitles

    XMLWordPrintable

Details

    Description

      The Table of contents in the PDF is generated based on pagetitles, not based on the headings in the document. This means that the document structure does not necessarily match the table of contents.

      For example, lets say the document structure is as follows, each separate wiki page is marked with a star

      |- h1. Introduction*
      |- h1. Basic use*
        |- h2. First command*
        |- h2. Second command*
      |- h1. Advanced use*
        |- h2. Extra command
      |- h1. Final words*
      

      Note how the Advanced use wiki page contains the subheading Extra command, which is not a separate wikipage.

      The table of contents will be rendered completely omitting the h2. Extra command.

      |- h1. Introduction*
      |- h1. Basic use*
        |- h2. First command*
        |- h2. Second command*
      |- h1. Advanced use*
      |- h1. Final words*
      

      What I would expect is that the table of contents for the pdf would be generated based on the hX, since those describe the document's structure. Also it makes the table of contents completely useless for long wiki pages.

      In our case, we are using CSS rules to add numbers to the headings (which wasn't too easy to figure out how to do). However since the toc isn't generated from the document strucuture, while the CSS rule for numbering is, they get out of sync when some headings aren't in the TOC.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              336c0b68fb84 Mikko Virkkilä
              Votes:
              11 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: