Package Information
- Last Updated
- Authors
- @Neruthes
- Categories
- utility
1. Get the package
Download the package using the TPIX CLI:
tpix get @preview/yemianfengge:0.1.02. Import in your Typst file
Add this to your .typ file:
#import "@preview/yemianfengge:0.1.0": *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")
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:
#AddToShipoutFG({
getpagestyle(sty => context {
if sty == "plain" {
place(top + center, dy: -10mm, inset: 20mm, [...])
}
place(bottom + center, dy: 10mm, inset: 20mm, [...])
})
})