--- title: "Table of Contents (TOC)" slug: "toc-element" updated: 2023-01-18T18:33:22Z published: 2023-01-18T18:33:22Z canonical: "docs.ancoresoft.com/toc-element" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.ancoresoft.com/llms.txt > Use this file to discover all available pages before exploring further. # Table of Contents (TOC) ## Intro As the name already precisely gives away what it does, this special element creates a table listing the contents of your report. You can choose for each chart, table, or text element of your report whether it should be considered and displayed in the TOC or not (for example to skip headers). Furthermore can the TOC function as PDF bookmarks only, without being displayed on your report. The TOC (table of contents) element itself basically behaves like other regular elements, meaning you can place it anywhere in the order of elements in your report (beginning, end, or somewhere in between) and also as often as you like. PDF exports onlyThe TOC element only takes effect, if the report is exported to PDF. If the report gets exported to PowerPoint, Excel, or other formats, then the TOC element will not be considered. | ### Show Elements in TOC By default, each element of your report will be considered and displayed in the TOC, **even if you add the TOC element later on**. You can **opt-out** for each element, which you don't want to be visible in the TOC (for example headers, paragraphs, certain objects, etc.). Besides this, you can also set the following properties individually for each element: - The **Indent** to create a topic hierarchy, - a **Label** that represents the element in the TOC (by default the element's Caption is populated as a label), - and the **Font Style** to separate sections in the TOC You can find these settings under **TOC Table of Contents** of each Chart, Table, or Text element: - [Go to TOC settings for Charts](/ancoreshare-extension/docs/qlik-object-charts#toc-table-of-contents) - [Go to TOC settings for Tables](/ancoreshare-extension/docs/table-object-properties#toc-table-of-contents) - [Go to TOC settings for Text elements](/ancoreshare-extension/docs/text-element#toc-table-of-contents) | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673886027793.png) | | --- | --- | | Show cycled elementsYou can also show a header for a cycle start in the TOC, as well as each looped element within the cycle. Refer to [Cycling Elements](/ancoreshare-extension/docs/cycle-element) to learn more. NoteThe TOC is not visible/enabled, as long as no element of your report is assigned to the TOC. A header is not included, but you can add one with a text element anytime. Line elements are not considered in the TOC. | | ## Basic TOC Settings Here begins the description of all available settings for a TOC element. Start by adding a TOC element and set general element properties. | | | ### Adding TOC element 1. On your Sense sheet, select the ancoreShare button to which you want to add the element. 2. On the **properties panel**, click **Report** **Elements** **>** **Add** **Element**. 3. Click on **Type** and select **Table of Contents** from the dropdown list. **NOTE:** The **Add Element** button is always available at the bottom of the **properties** **panel**. For multiple elements, please scroll down to see the button. ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673878991880.png) | | ### Caption When you add a TOC element, the **caption** is automatically populated as **TOC Table of Contents**. You can rename this field to provide a meaningful caption that will help you in navigating through your report elements. | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673806221671.png) | | ### Visibility You can choose whether to display this TOC element on a page of your report as well or to generate it only in the meta data to utilize it for **PDF bookmarks**. - **Show TOC on page**: The TOC is a visible element of the report and in addition the TOC is shown as bookmarks in a PDF reader. - **Bookmarks only**: TOC is not visible on the report page, but as bookmarks in a PDF reader. | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673806553276.png) | | ### Calculation condition In the **Calculation Condition** field, specify an expression to display the TOC element. It works just like the [activation condition](/ancoreshare-extension/docs/activation-condition) but is specific to each element. You can specify the value as a calculated formula. Refer to the [Qlik documentation](https://help.qlik.com/en-US/sense/May2021/Subsystems/Hub/Content/Sense_Hub/Expressions/work-with-expression-editor.htm) to know more. | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673806612932.png) | ## TOC Element Properties | ### Anchor If there is another existing element on your sheet that comes before in order, you will see an **Anchor** tab. This setting defines the relative position of elements on the report page. Drag the orange box "B" to set the position of this TOC element with respect to the preceding element "A" or choose an anchor position from the drop-down list above. To learn more about how all the positioning and sizing settings work together and affect each other, and how to precisely position the elements on your report by combining them, go to [Positioning and Sizing elements](/ancoreshare-extension/docs/positioning-and-sizing-elements). | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/anchor_element(2).png) | | --- | --- | | ### Position Click the **Position** tab to define general position settings for the TOC element on your report. - Optionally, select to **Place element on new page** to add a new page to the report and start with this there. - Use the **alignment** options to align the TOC element horizontally on the report page. | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673809401848.png) | | ### Font Click the Font tab to specify the font properties of the TOC element. - **Font Family:** Select one of the typeface options from the list. - **Font Color:** Use the color picker or provide a HEX code to choose the font color. - **Fill Color**: Fills the background of the TOC area. Use the color picker or provide a HEX code. - **Font Size:** Specify the font size for table content. You can use the expression for dynamic sizing. The **Font Style** (bold, italic, etc.) can be set for each element separately in the corresponding TOC menu of the elements: - [Font Style for Chart in TOC](/ancoreshare-extension/docs/qlik-object-charts#toc-table-of-contents) - [Font Style for Table in TOC](/ancoreshare-extension/docs/table-object-properties#toc-table-of-contents) - [Font Style for Text element in TOC](/ancoreshare-extension/docs/text-element#toc-table-of-contents) | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673810635101.png) | | ### Size Click the **Size** tab to set the sizing type and optionally the width of the TOC element on your report. You can choose any of the following options: - **Automatic:** By default, the TOC element takes 100% of the page width. - **Percentage of page size:** Select this option to define the **Width** as a percentage of the report page. - **Numeric value:** Select this option to provide a specific **Width** value manually. By default, the width is measured in millimeters, but you can change the page unit in the [Report Settings](https://docs.ancoresoft.com/ancoreshare-extension/docs/page-settings#page-settings). WidthThe width setting is only visible, if the size **Type** is set to "Percent of page size" or "Numeric value". | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673810008851.png) | | ### Spacing Click the **Spacing** tab to define the distance of the TOC element from neighboring elements on your report. You can do this separately for **Left**, **Right**, **Top**, and **Bottom**. The behavior of spacing depends on the selected [size type](https://docs.ancoresoft.com/docs/text-element#size). 1. If you have set the size type as **Automatic** or **Percentage of page size**, then the spacing will act as *padding* and affect the visual *size* of the text element. 2. If you have set the size type as **Numeric**, the spacing will act as a *margin* and affect the actual *position* of the text element. | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/spacing(2).png) | | ### Cell Padding The TOC is basically a table with two columns, left one for the content headers and right one for the page numbers. Click the **Cell Padding** tab to define the distance of table content from the cell lines inside this table. Enter the padding value for **Left**, **Right**, **Top**, and **Bottom.** Optionally, provide an expression for specifying conditional padding value. **NOTE:** The cell padding value is always specified in points. | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673810948171.png) | | ### Border Add a border framing the TOC. Borders are particularly useful when designing the report with multiple elements, as they present a clear picture of what element takes up how much space exactly. Once you have this visibility, you can easily decide the size and margin for all elements. | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/image-1673811390594.png) | | ### Deleting TOC element At any time, you can click the **Delete** button to delete the TOC element. Optionally, right-click the element in the **properties** **panel** and click **Delete**. | | --- | | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/Deleting_chart.png) | ![](https://cdn.document360.io/18d7facc-a391-4796-9eeb-b1efbd1aaa20/Images/Documentation/deleting-element(2).png) | --- ##### Next Steps: - Learn more about [positioning](/ancoreshare-extension/docs/positioning-and-sizing-elements) all elements - See a report draft in the [preview window](/ancoreshare-extension/docs/preview-window) - Or, [share and export](/ancoreshare-extension/docs/share-report-and-export-settings) the report