You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the few Nimib files that I created, I always resort to templates similar to this one for the creation of a table of contents (TOC):
var nbToc: NbBlocktemplateaddToc=newNbBlock("nbText", false, nb, nbToc, ""):
nbToc.output ="### Table of Contents:\n\n"templatenbSection(name:string) =let anchorName = name.toLower.replace("", "-")
nbText"<a name = \""& anchorName &"\"></a>\n## "& name &"\n\n---"# see below, but any number works for a numbered list
nbToc.output.add"1. <a href=\"#"& anchorName &"\">"& name &"</a>\n"
It would be interesting to make this easily configurable with a simple addToc command, that would define nbSection, nbSubSection, nbSubSubSection, nbParagraph (like Latex?) or nbH1Title, nbH2Title, etc ... for each level of heading.
It would be cool if the Toc appearance could be configurable too (level of heading, title?) without having to resort to nbToc.output and newNbBlock.
The text was updated successfully, but these errors were encountered:
In the few Nimib files that I created, I always resort to templates similar to this one for the creation of a table of contents (TOC):
It would be interesting to make this easily configurable with a simple addToc command, that would define nbSection, nbSubSection, nbSubSubSection, nbParagraph (like Latex?) or nbH1Title, nbH2Title, etc ... for each level of heading.
It would be cool if the Toc appearance could be configurable too (level of heading, title?) without having to resort to nbToc.output and newNbBlock.
The text was updated successfully, but these errors were encountered: