toc & toc_with_title_pages
Root: export
This drop can only be used in the Table of contents text within "Style settings"
Methods
Method | Return type | Description |
---|---|---|
anchor | link | For linking to the section in the PDF. Use it as the target in a liquid link:[{{ toc.number }}](#{{ toc.anchor }}) |
number | integer | Starting page number for the section/block |
title | string | Name of each export block (i.e. the name of each of the title pages) |
type | string | It either returns title_page (when toc_with_title_pages is used) or nil (for the remaining pages) |
until_number | string | Ending page number for the section/block |
Example
{% stripnewlines %}
|---5%--:
|:--75%---
|-------:+
{% newline %}
{% for toc in export.toc %}
{% assign nr = nr | plus:1 %}
| {{ nr }}.
| [{{ toc.title }}](#{{ toc.anchor }})
| [{{ toc.number }}](#{{ toc.anchor }})
{% newline %}
{% endfor %}
{% endstripnewlines %}
Updated almost 3 years ago