verseatile is a small package for setting poetry with Typst, capable of easily indenting and numbering verses while providing many options for customization.
To print a poem, simply use the #poem function:
#import "@preview/verseatile:0.1.0": *
#poem[Hor. carm. I, 26][
Musis amicus tristitiam et metus \
tradam protervis in mare Creticum \
portare ventis, quis sub Arcto \
rex gelidae metuatur orae,
quid Tiridaten terreat, unice \
securus. O quae fontibus integris \
gaudes, apricos necte flores, \
necte meo Lamiae coronam,
Piplea dulcis. Nil sine te mei \
prosunt honores; hunc fidibus novis, \
hunc Lesbio sacrare plectro \
teque tuasque decet sorores.
][0]To configure the indentation of verses simply provide an indentpattern (such as 0012) as the thrid argument of the #poem function:
#poem[Hor. carm. I, 26][
Musis amicus tristitiam et metus \
tradam protervis in mare Creticum \
portare ventis, quis sub Arcto \
rex gelidae metuatur orae,
quid Tiridaten terreat, unice \
securus. O quae fontibus integris \
gaudes, apricos necte flores, \
necte meo Lamiae coronam,
Piplea dulcis. Nil sine te mei \
prosunt honores; hunc fidibus novis, \
hunc Lesbio sacrare plectro \
teque tuasque decet sorores.
][0012]To display verse numbers toggle #show-verse-numbers:
#show-verse-numbers.update(true)Verse numbers can also be customzied and set to number only every
#show <verse-number>: set text(
size: 8pt)
#verse-number-modulo.update(2)Utilizing both the indentpattern and numbering verses (while also customizing the style of the poemtitle) one might arrive at this simple, yet elegant rendition of our poem shown in the image at the beginning:
#import "@preview/verseatile:0.1.0": *
#show <poemtitle>: it => text(
size: 14pt,
weight: "medium",
number-type: "old-style")[#smallcaps(it)]
#show-verse-numbers.update(true)
#show <verse-number>: set text(
size: 8pt)
#verse-number-modulo.update(4)
#poem[Hor. carm. I, 26][
Musis amicus tristitiam et metus \
tradam protervis in mare Creticum \
portare ventis, quis sub Arcto \
rex gelidae metuatur orae,
quid Tiridaten terreat, unice \
securus. O quae fontibus integris \
gaudes, apricos necte flores, \
necte meo Lamiae coronam,
Piplea dulcis. Nil sine te mei \
prosunt honores; hunc fidibus novis, \
hunc Lesbio sacrare plectro \
teque tuasque decet sorores.
][0012]For advanced usage such as customizing poemtitles, configuring inline poemtitles and printing cycles of poems confer the manual.
