Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/gaiarajan/poem-scaler/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Poem Scaler for WordPress
Most litmags format experimentally spaced poems using images, but this reduces accessibility and makes the poems unsearchable. This is a Wordpress plugin to preserve whitespace formatting across the page by scaling down for narrower screen sizes.
Installation
- Upload the
poem-scaler/folder to/wp-content/plugins/ - Activate via the WordPress Plugins screen
- The
[poem]shortcode is now available anywhere you write content
Demo
(by e.e. cummings)
Usage
Basic
[poem]
words words
word word
words
[/poem]
Title
[poem title="words"]
...
[/poem]
Fonts
[poem font="mono"]: monospace
[poem font="serif"]: uses your theme's body font (default)
[poem font="sans"]: uses your theme's sans-serif font
Minimum scale
By default, poems will scale down to 35% of their natural width before the plugin falls back to horizontal scroll. Adjustable
[poem min_scale="0.5"]: won't scale below 50%; scrolls instead
[poem min_scale="0.2"]: allows very aggressive scaling
Editing tips
- Use spaces instead of tabs if you want completely predictable column
alignment (tabs render at 4 characters wide by default; this is configurable
in poem-scaler.css via
tab-size) - Use the Classic block in Gutenberg or the Classic Editor plugin when pasting the shortcode, Gutenberg's paragraph blocks may strip whitespace from shortcode content
Customization
You can edit poem-scaler.css to match the theme.
.poem-pre line-height— adjust vertical spacingtab-size— how wide tabs render.poem-scaler[data-scaled="true"]::after— "X% of original size" indicator, delete if you don't want it