Skip to content
Discussion options

You must be logged in to vote

Each typst file exists in its own scope, and does not bring with it any definitions when included. I'd recommend creating a file that defines functions you intend to reuse:

/// preamble.typ
#let pseudoheading(body) = {
  set align(center)
  set par(justify: false)
  smallcaps(body)
}

and import it from your file

/// include.typ
#import "preamble.typ": pseudoheading

#pseudoheading[
  Lorem ipsum dolor sit ametxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, consectetur adipiscing elit
]

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by johnmapeson
Comment options

You must be logged in to vote
2 replies
@johnmapeson
Comment options

@hurzl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants