#set page(width:5.25in, height:8in, margin: .5in)
#set text(size: 11pt, font: "Libre Baskerville")
#set par(first-line-indent: 1.75em,justify: true)

#set commands make changes from that point forward in the document. If you place these at the top of your document, they affect everything below it. But you could use other #set commands later to override those changes — for instance, if you switch from one text column to two.

Typst code mode

The hash (#) in Typst (except when escaped with a slash) is used to signal a switch from regular text (markup mode) to Typst commands (code mode). Those commands can span multiple lines, until the Typst code block or expression is concluded:

This is regular text.

#let inline_image(img) = {
  box(height: 8em, place(top+left, dx: 5pt, square(
      image(img, height:100%, fit:"cover")
  )))
}

This is regular text again.

Here, we’ve used #let to define a function that takes one argument (the name of an image), and inserted it into an inline box. The curly braces indicate the body of the function, but individual lines end in a line break as in Python, not in a semicolon as in JavaScript.