Without any package other than geometry
This lacks many of the features of the verse
environment, but has all the properties you need. Some adjustment might be necessary, the dimensions I set are a bit arbitrary. The pass
option to geometry makes it accept the default class setting, but allows us to use its features, particularly \newgeometry
.
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[pass]{geometry}
\newsavebox\poembox
\newsavebox\poemtitlebox
\newcommand{\settitle}[1]{%
\vbox{\let\\\cr\halign{\hfil##\hfil\cr#1\crcr}}}
\newenvironment{poem}[1]
{\newpage\newgeometry{margin=0pt}%
\sbox\poemtitlebox{\settitle{#1}}%
\setbox\poembox=\vbox\bgroup
\obeylinescr\halign\bgroup##\hfil\cr}
{\crcr\egroup\egroup
\ifdim\dimexpr\ht\poemtitlebox+\ht\poembox>.7\pdfpageheight\relax
\displacedpoem
\else
\centeredpoem
\fi
\clearpage\restoregeometry}
\def\obeylinescr{\catcode`\^^M=13
\begingroup\lccode`\~=`\^^M\lowercase{\endgroup\let~}\cr}
\def\centeredpoem{\vbox to 0pt{\vspace*{1cm}\centerline{\box\poemtitlebox}\vss}
\vfill\centerline{\box\poembox}\vfill}
\def\displacedpoem{\vspace*{1cm}\centerline{\box\poemtitlebox}
\vfill\centerline{\box\poembox}\vspace*{1cm}}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\begin{poem}{La vispa Teresa\\\emph{Luigi Sailer}}
La vispa Teresa
avea tra l’erbetta
A volo sorpresa
gentil farfalletta
E tutta giuliva
stringendola viva
gridava distesa:
``L'ho presa! L'ho presa!''.
A lei supplicando
l'afflitta gridò:
``Vivendo, volando
che male ti fo?
Tu sì mi fai male
stringendomi l'ale!
Deh, lasciami! Anch'io
son figlia di Dio!''.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
\end{poem}
\lipsum[3-4]
\begin{poem}{La vispa Teresa\\\emph{Luigi Sailer}}
La vispa Teresa
avea tra l’erbetta
A volo sorpresa
gentil farfalletta
E tutta giuliva
stringendola viva
gridava distesa:
``L'ho presa! L'ho presa!''.
A lei supplicando
l'afflitta gridò:
``Vivendo, volando
che male ti fo?
Tu sì mi fai male
stringendomi l'ale!
Deh, lasciami! Anch'io
son figlia di Dio!''.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
\end{poem}
\begin{poem}{La vispa Teresa\\\emph{Luigi Sailer}}
La vispa Teresa
avea tra l’erbetta
A volo sorpresa
gentil farfalletta
E tutta giuliva
stringendola viva
gridava distesa:
``L'ho presa! L'ho presa!''.
A lei supplicando
l'afflitta gridò:
``Vivendo, volando
che male ti fo?
Tu sì mi fai male
stringendomi l'ale!
Deh, lasciami! Anch'io
son figlia di Dio!''.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
\end{poem}
\begin{poem}{La vispa Teresa\\\emph{Luigi Sailer}}
La vispa Teresa
avea tra l’erbetta
A volo sorpresa
gentil farfalletta
E tutta giuliva
stringendola viva
gridava distesa:
``L'ho presa! L'ho presa!''.
A lei supplicando
l'afflitta gridò:
``Vivendo, volando
che male ti fo?
Tu sì mi fai male
stringendomi l'ale!
Deh, lasciami! Anch'io
son figlia di Dio!''.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
Teresa pentita
allenta le dita:
``Va', torna all'erbetta,
gentil farfalletta''.
Confusa, pentita,
Teresa arrossì,
dischiuse le dita
e quella fuggì.
\end{poem}
\end{document}
Using the verse package
\usepackage{verse}
\newenvironment{versepoem}[2]
{\newpage\newgeometry{margin=0pt}%
\sbox\poemtitlebox{\settitle{#1}}%
\settowidth{\versewidth}{#2}
\setbox\poembox=\vbox\bgroup\hsize=\versewidth
\begin{verse}[\versewidth]}
{\end{verse}\egroup\showthe\wd\poembox
\ifdim\dimexpr\ht\poemtitlebox+\ht\poembox>.7\pdfpageheight\relax
\displacedpoem
\else
\centeredpoem
\fi
\clearpage\restoregeometry}
...
\begin{versepoem}{La vispa Teresa (versepoem)\\\emph{Luigi Sailer}}{``L'ho presa! L'ho presa!''.}
La vispa Teresa\\
avea tra l’erbetta\\
A volo sorpresa\\
gentil farfalletta\\
E tutta giuliva\\
stringendola viva\\
gridava distesa:\\
``L'ho presa! L'ho presa!''.
A lei supplicando\\
l'afflitta gridò:\\
``Vivendo, volando\\
che male ti fo?\\
Tu sì mi fai male\\
stringendomi l'ale!\\
Deh, lasciami! Anch'io\\
son figlia di Dio!''.\\
Teresa pentita\\
allenta le dita:\\
``Va', torna all'erbetta,\\
gentil farfalletta''.\\
Confusa, pentita,\\
Teresa arrossì,\\
dischiuse le dita\\
e quella fuggì.
\end{versepoem}
The versepoem
environment needs two arguments: the title and the widest verse. All the preceding code is needed, except for the definition of the poem
environment. Of course also \usepackage{verse}
is required.
\vfill
doesn't solve your problem? You can do something like\newenvironment{verticalcenteredverse}{\vfill\begin{verse}}{\end{verse}\vfill}
... It will get your poem vertically centered, except for those too long for one single page... – henrique Jun 15 '11 at 13:48\centering
) wont solve that part, since you don't want to make the individual lines of the poem centred. – Alan Munn Jun 15 '11 at 14:30