// Setup special styling to improve the conversion to plain text before checking with LanguageTool. #let lt(overwrite: false, seperate-sections-level: 3) = { // only apply the styling if overwrite is true or the spellcheck input exists if not sys.inputs.at("spellcheck", default: overwrite) { return doc => doc } return doc => { // replace math with // inline: 0 (smaller size to avoid line height changes) // block: nothing show math.equation.where(block: false): it => text("0", size: 0.8em) show math.equation.where(block: true): it => [] // autogenerated and a lot of names, just remove it show bibliography: it => [] // setup consisting line spacing set par(justify: false, leading: 0.65em, hanging-indent: 0pt) // avoid page breaks set page(height: auto) show block: it => it.body // remove page numbering show page: set page(numbering: none) // split pages before important headings show heading: it => if it.level <= seperate-sections-level { pagebreak() + it } else { it } doc } }