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
Thanks for providing LiaScript! It is much improving how we provide OER content!
Structuring my courses, I regularly end up with slides that are empty, except of the chapter-title. This pages may appear to users as if the content is not loading or so.
Wouldn't it be nice to have a mini table of contents (mini-toc) on this empty pages, just listing the sub-chapters?
It is possible to create such a mini-toc manually:
# heading
[subheading1](#subheading1)
[subheading2](#subheading2)
## subheading1
lorem ipsum
## subheading2
lorem ipsum
It would be more convenient to have something like this:
# heading
@mini-toc
## subheading1
lorem ipsum
## subheading2
lorem ipsum
You find an example course at https://fh.ms/floss.
I tried to write a JavaScript but failed.
Hi, and a very nice course, thank you for using LiaScript ;-) ... providing a @mini-toc with javascript is possible, but it would be a weird hack ... I think for such purposes, it would be good to have a general solution, with parameters @mini-toc(start, depth), depending on whether we want only the current section with all subsections or sub-subsections, or referencing another part ... Maybe you have some suggestions on how to make this "mostly" general? However, we will have to think about this, and maybe come up with a solution by the end of next week ...
Thanks a lot for the quick and positive response!
There are a couple of minitoc packages for LaTeX (minitoc, aeb-minitoc, etoc, ...). I am not sure, if they may serve as a template. The existence of these packages may rather underline a general demand.
The most general way would be the one, you suggested, I guess. Thus:
@mini-toc(start, depth)
with start=auto (the actual level) and depth=1 being good default values.
But to be honest, I would just keep it simple:
@mini-toc(depth)
with depth=1 as a default.
I can not really think of good use cases, where you would like to start further upwards?
Activity
andre-dietrich commentedon Sep 16, 2025
Hi, and a very nice course, thank you for using LiaScript ;-) ... providing a
@mini-tocwith javascript is possible, but it would be a weird hack ... I think for such purposes, it would be good to have a general solution, with parameters@mini-toc(start, depth), depending on whether we want only the current section with all subsections or sub-subsections, or referencing another part ... Maybe you have some suggestions on how to make this "mostly" general? However, we will have to think about this, and maybe come up with a solution by the end of next week ...eguvep commentedon Sep 16, 2025
Thanks a lot for the quick and positive response!
There are a couple of minitoc packages for LaTeX (minitoc, aeb-minitoc, etoc, ...). I am not sure, if they may serve as a template. The existence of these packages may rather underline a general demand.
The most general way would be the one, you suggested, I guess. Thus:
with start=auto (the actual level) and depth=1 being good default values.
But to be honest, I would just keep it simple:
with depth=1 as a default.
I can not really think of good use cases, where you would like to start further upwards?