Text FormattingPoetry

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

Poetry

Post by Laurentius »

In poetry, a new line is sometimes begun where the previous ended; is there an easy way to do this?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Poetry

Post by cgnieder »

It took me a moment until I (probably) understood what you meant. I guess you would want the verse package:

Code: Select all

\documentclass{article}
\usepackage{verse}
\newcommand\attrib[1]{\nopagebreak{\raggedleft\footnotesize #1\par}}
\newlength\lineindent
\newcommand*\setlineindent[1]{%
  \settowidth\lineindent{#1}%
  \addtolength\lineindent{-\vgap}%
  \addtolength\lineindent{-10pt}}

\begin{document}

\poemtitle{Mathematics}
\settowidth\versewidth{Than Tycho Brahe, or Erra Pater:}
\begin{verse}[\versewidth]
In mathematics he was greater \\
Than Tycho Brahe, or Erra Pater: \\
For he, by geometric scale, \\
Could take the size of pots of ale;\\ \setlineindent{Resolve, by sines}
Resolve, by sines \\>[\lineindent] and tangents straight, \\
If bread or butter wanted weight; \\
And wisely tell what hour o’ the day \\
The clock does strike, by Algebra.
\end{verse}
\attrib{Samuel Butler (1612--1680)}

\end{document}
verse.png
verse.png (31.62 KiB) Viewed 6547 times
Regards
site moderator & package author
Post Reply