y

yemianfengge

@preview

Page style management.

v0.1.1
MIT

Introduction

This package affords the ability to set and get page styles on the fly in the document stream.

Commands

pagestyle

Set global pagestyle.

Example:

#pagestyle("plain")

thispagestyle

Set pagestyle of this page only.

Example:

#thispagestyle("empty")

nextpagestyle

Set pagestyle of this page only.

Example:

#nextpagestyle("empty")

getpagestyle

Get the pagestyle of the current page.

Example:

#getpagestyle(sty => {
    if sty == "plain" { [...] }
})

Integration

Plain foreground:

#set page(foreground: {
    getpagestyle(sty => context {
        if sty == "plain" {
            place(top + center, dy: -10mm, inset: 20mm, [...])
        }
        place(bottom + center, dy: 10mm, inset: 20mm, [...])
    })
})

Use with ose-pic:

#AddToShipoutFGAll({
    getpagestyle(sty => context {
        if sty == "plain" {
            place(top + center, dy: -10mm, inset: 20mm, [...])
        }
        place(bottom + center, dy: 10mm, inset: 20mm, [...])
    })
})

Version History

0.1.1
ee9c97e74aff...
0.1.0
449c028d71fa...