diff --git a/CHANGELOG.md b/CHANGELOG.md index 76dfcbd9..fcdc83de 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers - Settings: Ability to use PCLZip as alternative to ZipArchive - @bskrtich @ivanlanin GH-106 GH-140 GH-185 - Template: Ability to find & replace variables in headers & footers - @dgudgeon GH-190 - Template: Ability to clone & delete block of text using `cloneBlock` and `deleteBlock` - @diego-vieira GH-191 +- TOC: Ability to have two or more TOC in one document and to set min and max depth for TOC - @Pyreweb GH-189 ### Bugfixes diff --git a/docs/elements.rst b/docs/elements.rst index bded72b8..54925551 100644 --- a/docs/elements.rst +++ b/docs/elements.rst @@ -316,7 +316,14 @@ Your TOC can only be generated if you have add at least one title (See .. code-block:: php - $section->addTOC([$fontStyle], [$tocStyle]); + $section->addTOC([$fontStyle], [$tocStyle], [$minDepth], [$maxDepth]); + +- ``$fontStyle``: See font style section +- ``$tocStyle``: See available options below +- ``$minDepth``: Minimum depth of header to be shown. Default 1 +- ``$maxDepth``: Maximum depth of header to be shown. Default 9 + +Options for ``$tocStyle``: - ``tabLeader`` Fill type between the title text and the page number. Use the defined constants in PHPWord\_Style\_TOC.