Compiler: Tweego v2.1.1
Story Format: SugarCube v2.30.0
Is there any way to programmatically append (at compile time, not at runtime) a link to the current passage to the end of another passage?
I’d like to generate a “Table of Contents” passage without having to manually type in the names of the specific passages that I want shown there. That gets to be tedious and error prone, especially when passage names change and get re-ordered or deleted. Having them show up in the same order that they’re encountered in the .tw file would be appropriate for my needs.
A construct of the form
:: FirstChapterTitle [toc] :: SecondChapterTitle [toc]
:: FirstChapterTitle <<toc "FirstChapterTitle">>
would be fine.
I’m not at all proficient in writing CSS so there’s doubtless something I haven’t thought of or have overlooked in the tweego and SugarCube documentation.