Typesetting Poetry in HTML
gwern.net·5d·
Discuss: Hacker News
Web Accessibility
Preview
Report Post

Web design post-mortem of ways to typeset poetry and how we developed our advanced approach.

Poetry is surprisingly difficult to typeset in HTML because poems sometimes require precise control over whitespace & layout, while HTML (and most formats compiling to HTML, like Markdown) by default collapses whitespace and doesn’t allow easy control of indentation. It is not as difficult as typesetting mathematics, but it’s still not trivial to do.

We evaluated and rejected most standard solutions in favor of a hybrid solution.

We rely on some simple JS interpretation of semantic classes & <pre> tag, which can express most use-ca…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help