Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
131255a
Create lib.typ
switchlex May 28, 2026
61b7db3
Add files via upload
switchlex May 28, 2026
cce1797
Create ex.typ
switchlex May 28, 2026
d0cc7ec
Add files via upload
switchlex May 28, 2026
7394b8f
Delete packages/preview/verseatile/0.1.0/examples/ex.typ
switchlex May 28, 2026
0d0ba43
Create docs.typ
switchlex May 28, 2026
4e4d4ad
Add files via upload
switchlex May 28, 2026
adb8b63
Delete packages/preview/verseatile/0.1.0/docs/docs.typ
switchlex May 28, 2026
5b3e5a7
Delete packages/preview/verseatile/0.1.0/example.png
switchlex May 28, 2026
b8d14fc
Delete packages/preview/verseatile/0.1.0/example.typ
switchlex May 28, 2026
d1a8b74
Delete packages/preview/verseatile/0.1.0/manual.pdf
switchlex May 28, 2026
f162350
Delete packages/preview/verseatile/0.1.0/manual.typ
switchlex May 28, 2026
c2df410
Update lib.typ
switchlex Jun 1, 2026
6eb1db5
Merge branch 'typst:main' into main
switchlex Jun 2, 2026
2097147
Create version
switchlex Jun 2, 2026
75fd0f6
Delete packages/preview/verseatile/0.1.1/version
switchlex Jun 2, 2026
e794769
Create version
switchlex Jun 2, 2026
5874141
Add files via upload
switchlex Jun 2, 2026
cad91c3
Delete packages/preview/verseatile/0.1.1/version
switchlex Jun 2, 2026
b8ebe24
Create docs
switchlex Jun 2, 2026
3036529
Add files via upload
switchlex Jun 2, 2026
787afe9
Delete packages/preview/verseatile/0.1.1/docs/docs
switchlex Jun 2, 2026
fc7b02f
Create example.typ
switchlex Jun 2, 2026
8bec256
Add files via upload
switchlex Jun 2, 2026
442a0b2
Update README.md
switchlex Jun 2, 2026
b2cf5f8
Update README.md
switchlex Jun 2, 2026
17c9442
Merge branch 'typst:main' into main
switchlex Jun 11, 2026
ac1c09b
Create manual.typ
switchlex Jun 11, 2026
b8a44e4
Add files via upload
switchlex Jun 11, 2026
1e1b8f3
Create example.typ
switchlex Jun 11, 2026
720b691
Add files via upload
switchlex Jun 11, 2026
f27b12d
Add files via upload
switchlex Jun 11, 2026
ea7fc42
Update README.md
switchlex Jun 11, 2026
f8fe3a0
Update lib.typ
switchlex Jun 11, 2026
ad0135b
Update lib.typ
switchlex Jun 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/preview/verseatile/0.2.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Alexander Abt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
154 changes: 154 additions & 0 deletions packages/preview/verseatile/0.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# verseatile

[![Typst universe](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fswitchlex%2Fverseatile%2Frefs%2Fheads%2Fmain%2Ftypst.toml&query=%24.package.version&prefix=v.&logo=typst&label=Typst%20Universe&labelColor=white&color=grey)](https://typst.app/universe/package/verseatile)
[![Manual](https://img.shields.io/badge/Manual-pdf-grey?labelColor=white)](https://raw.githubusercontent.com/switchlex/verseatile/0.2.0/docs/manual.pdf)

Check warning on line 4 in packages/preview/verseatile/0.2.0/README.md

View check run for this annotation

Typst package check / @preview/verseatile:0.2.0

packages/preview/verseatile/0.2.0/README.md#L4

Possibly inadequate alternative description for image: `Manual`. Please add a short description to make this image more accessible.
[![License](https://img.shields.io/badge/License-MIT-grey?labelColor=white)](./LICENSE)

Check warning on line 5 in packages/preview/verseatile/0.2.0/README.md

View check run for this annotation

Typst package check / @preview/verseatile:0.2.0

packages/preview/verseatile/0.2.0/README.md#L5

Possibly inadequate alternative description for image: `License`. Please add a short description to make this image more accessible.

verseatile is a small package for setting poetry with [Typst](https://github.com/typst/typst), capable of easily indenting and numbering verses while providing many options for customization.

![Examples](examples/example.png)

Check warning on line 9 in packages/preview/verseatile/0.2.0/README.md

View check run for this annotation

Typst package check / @preview/verseatile:0.2.0

packages/preview/verseatile/0.2.0/README.md#L9

Possibly inadequate alternative description for image: `Examples`. Please add a short description to make this image more accessible.

## Getting started

To print a poem, simply use the #poem function:
```typst
#import "@preview/verseatile:0.2.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]
```

### Using indentpatterns

To configure the indentation of verses provide an indentpattern (such as 0012) as the thrid argument of the #poem function:

```typst
#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]
```

### Numbering verses

To display verse numbers toggle #show-verse-numbers:

```typst
#show-verse-numbers.update(true)
```

Verse numbers can also be set to number only every $n$-th verse:

```typst
#verse-number-modulo.update(2)
```

### Using presets

Presets are preconfigured style sets that can be used for simple and effective styling. To apply a preset use:

```typst
#show: preset-〈name〉

Check warning on line 81 in packages/preview/verseatile/0.2.0/README.md

View check run for this annotation

Typst package check / @preview/verseatile:0.2.0

packages/preview/verseatile/0.2.0/README.md#L81

Syntax error in README. expected semicolon or line break If this code block is not supposed to be parsed as a Typst source, please explicitely specify another language.
```

As of v.0.2.0 the following presets are included with the package:

- `classic`
- `classic-headings`

### Putting it all together

Utilizing both the indentpattern and numbering verses while applying a preset, one might arrive at this simple, yet elegant rendition of our poem shown on the left in the [example image](examples/example.png) at the top of the page:

```typst
#import "@preview/verseatile:0.2.0": *

#show: preset-classic

#show-verse-numbers.update(true)
#verse-number-modulo.update(2)

#poem[Hor. carm. i, 26][

Musis amicus tristitiam et metus \
tradam protervis in mare Creticum \
portare ventis, quis sub Arcto \
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]
```

## Advanced usage
For advanced usage such as inline poemtitles, interjections, dedications, splitting verses, setting cycles of poems as well as detailed options for customization confer the [manual](docs/manual.pdf).

## Changelog

### v.0.2.0

- New features:
- Added presets.
- Added interjections and dedications.
- Added functionality to split verses via `#splitverse[]` and `#versesplit`.
- Added subtitles for cycles and poems in cycles.
- Made the indentation of the first verse of a stanza configurable via `#stanza-indent.update()`.
- Made the starting verse number configurable via `#verse-numbers-start.update()`.
- Presets:
- Added presets (`classic`, `classic-headings`).
- Fixes:
- Reworked inline poemtitles to prevent false headings being displayed in the outline in certain constellations.
- Documentation:
- Updated the manual.
- Updated the readme.

### v.0.1.1

- New features:
- Made the distance between verse numbers and the poem configurable via `#verse-number-distance.update()`.
- Fixes:
- Reworked verse numbers to prevent them causing issues with indentation in certain constellations.
- Documentation:
- Updated the manual.

### v.0.1.0

Initial release.
Binary file not shown.
Loading
Loading