---
source: https://carbone.io/examples/summary/
title: "Professional Document Summary Generator"
description: "Learn how to create professional documents with automatic table of contents using our document generator. Convert JSON data into well-structured documents using DOCX templates. Perfect for reports, books, and business documents."
generated_at: "2026-07-13"
---

# Summary

Generate Professional Summary with Carbone

[![summary thumbnail](/examples/summary/thumb-result.webp)](/examples/summary/result.pdf)

[Download Template](/examples/summary/template.docx)

[Download data sample](/examples/summary/data.json)

-   Template type document docx simple
-   Carbone min. v4.0.0+
-   Features index table
-   Target index book brief

## Overview

Learn how to generate professional documents with an automatic table of contents using Carbone's document generation features. This example shows you how to create well-structured documents that include an organized index, with these key features:

-   Professional document layout
-   Automatic table of contents
-   Organized content structure
-   Automatic chapter numbering

## Step-by-Step Guide

Follow these simple steps to create your document with Carbone:

### 1\. Set Up the Document Format

-   Open the Microsoft Word **File** menu and select **Page Setup**
-   Select a standard paper size from the available options
-   For custom dimensions, use the **Custom Sizes** option

### 2\. Create the Document Structure

-   Use tables to maintain consistent content alignment
-   Insert [Carbone tags](/documentation/design/substitutions/the-basics.md#basic) to display dynamic data, for example:
    -   Use `{d.chapters[i].section}` for chapter titles in the first row
    -   Use `{d.chapters[i+1]}` in the second row for chapter iterations
    -   In table properties, uncheck **Allow row to break across pages** to maintain consistency
-   Format text and adjust spacing for better readability
-   Apply appropriate **Heading** styles (such as **Heading 1**) to sections you want to include in the table of contents

### 3\. Add the Table of Contents

-   In Microsoft Word, go to the **Insert** menu and click the **Field** button
-   Select **Index and Tables** from the **Categories** list
-   Choose **TOC** in the **Field names** section
-   Click **OK** to generate the table of contents

### 4\. Manage Chapters and Subchapters Numbering

-   For chapter numbering, add numbered bullets before the Carbone tag
-   To number subchapters, use the [:print](/documentation/design/formatters/text.md#print-message) formatter to display the [loop iterator value](/documentation/design/repetitions/with-arrays.md#access-the-loop-iterator-value), so it starts at 1 for each chapter.
-   Since array indexes start at 0, add 1 to the iterator value. The complete formula is:  
    `{d.chapters[i].subsections[i].category:print(..i):add(1)}`

That's it! Your document will now have a professional layout with an automatic table of contents.

## Related Examples

[![menu thumbnail example](/examples/menu/thumb-result.webp)](/examples/menu/index.md)

## Trusted by 800+ paid customers in 40+ countries

## Related topics

- [Transport ticket](/examples/ticket/index.md)
- [Stock inventory spreadsheet](/examples/stock-inventory-spreadsheet/index.md)
- [Store Inventory](/examples/shoes/index.md)
- [Sensor readings](/examples/sensor-readings/index.md)
- [Real estate property document](/examples/real-estate-property-description/index.md)
- [Automation of Quotes](/examples/quote-with-datasheet/index.md)
