andreasKroepelin / polylux

A package for creating slides in Typst
https://polylux.dev/book
MIT License
1.18k stars 55 forks source link

support adding heading for new sections #47

Closed ModProg closed 1 year ago

flavio20002 commented 1 year ago

It's a nice idea, this allow also to create a Table Of Content of the sections with:

`

locate(loc => {

            let elems = query(selector(heading.where(level: 1)).after(loc), loc)
            list(..elems.map(elem => {link(elem.location(),elem.body.child)}))

}) ] `

Let's see what the admin thinks.

andreasKroepelin commented 1 year ago

Nice idea, indeed. Sorry for taking so long to look at this. In fact, I kind of reworked the default theme, which is now called clean, and merged it with the former bristol theme (i.e. I've taken all the good things from there; see prepare-package branch). The new design has specific slides with section headings as well as a custom config for #outline, so this PR becomes osbsolete. Let me know if I missed something from this PR that should still be considered. (Combining hide and place to create an invisible heading for an outline or section infos on a slide should be documented somewhere, though. That might be very good to know for future theme authors that need this kind of trick.)