Not sure if this is sufficient, but it allows the avoidance of 1-line widows by growing the page by \baselineskip
. It is invoked with \\*
The "fix" accomplishes this by redefining \poem@endpart
, which is what gets invoked via \\*
. The original \poem@endpart
is saved in \poemendpart
The following MWE demonstrates the use of \\*
on page 1, but not on page 2 (which wraps to page 3).
\documentclass[a4paper]{article}
\usepackage{poetry}
\makeatletter
\let\poemendpart\poem@endpart
\def\poem@endpart{\enlargethispage{\baselineskip}\poem@endline}
\makeatother
\begin{document}
Some text.
\vspace{16.2cm} % Force poem down page
\poem
Some poetry\\
A metaphor here,\\
A metaphor there.\\!
Here begins another stanza\\
More words.\\!
The final stanza\\
A final metaphor\\*
The end\\-
\clearpage
Some text.
\vspace{16.2cm} % Force poem down page
\poem
Some poetry\\
A metaphor here,\\
A metaphor there.\\!
Here begins another stanza\\
More words.\\!
The final stanza\\
A final metaphor\\
The end\\-
\end{document}

An alternative in the other direction, that is, forcing an early break, is to issue a \clearpage
immediately prior to a \\
, as in
\documentclass[a4paper]{article}
\usepackage{poetry}
\begin{document}
Some text.
\vspace{16.2cm} % Force poem down page
\poem
Some poetry\\
A metaphor here,\\
A metaphor there.\\!
Here begins another stanza\\
More words.\clearpage\\!
The final stanza\\
A final metaphor\\
The end\\-
\clearpage
Some text.
\vspace{16.2cm} % Force poem down page
\poem
Some poetry\\
A metaphor here,\\
A metaphor there.\\!
Here begins another stanza\\
More words.\\!
The final stanza\\
A final metaphor\\
The end\\-
\end{document}

SUPPLEMENT
This attempt tries to modify the use of \\
so that page breaks are prevented altogether. Thus, a normal verse will never break across a page boundary midway through. Seems to work for this use case.
I edited \poem@endline
to begin with a \nopagebreak
, so that a break did not occur at such a line. However, additional instances of \nopagebreak
needed to be added in the macro \placelineno
, after instances of \hskip
, to prevent pagebreaks following the line number (but before the verse line). I don't think I got them all, but enough to demonstrate the effect in the OP's MWE.
\documentclass[a4paper]{article}
\usepackage{poetry}
\makeatletter
\def\poem@endline{\nopagebreak%
\par%
\advance\poemlineno by1%
\advance\vslineno by1%
\poem@defaultpars%
\leftskip=\poem@defleftskip%
\placelineno%
}%
\def\placelineno{%
\setcounter{verseline}{\the\vslineno}%
\setcounter{poemline}{\the\poemlineno}%
\poem@linenumsevery=\value{poemlinenumsevery}%
\poem@linenumboxgap=\the\poemlinenumboxgap%
\poem@linenumboxwd=\the\poemlinenumboxwd%
\modulo{\the\poemlineno}{\the\poem@linenumsevery}%
\ifpoemlinenums%
\ifnum\poem@tmpa=0%
\ifpoemlinenumright%
\hskip0pt\nopagebreak\tlap{%
\rlap{%
\hskip\poem@maxlinewd%
\hskip\poem@linenumboxgap%
\hbox to\poem@linenumboxwd{%
\hfil%
\poemlinenumstyle\thepoemline%
}%
}%
}%
\else%
\hskip-\poem@linenumboxgap\nopagebreak%
\llap{%
\tlap{%
\hbox to\poem@linenumboxwd{%
\poemlinenumstyle\thepoemline%
\hfil%
}\penalty10000%
}%
}\penalty10000%
\fi%
\else
\hskip-\poem@linenumboxgap\nopagebreak%
\llap{\tlap{\hbox to\poem@linenumboxwd{\hfil}}}%
\penalty10000%
\fi%
\else
\hskip-\poem@linenumboxgap\nopagebreak%
\llap{\tlap{\hbox to\poem@linenumboxwd{\hfil}}}%
\penalty10000%
\fi%
\par\vskip-\baselineskip%
\poem@indentevery=\value{poemindentevery}%
\ifnum\poem@indentevery=0%
\else%
\modulo{\the\poemlineno}{\the\poem@indentevery}%
\ifnum\poem@tmpa=0%
\hin%
\fi%
\fi%
\expandafter\poem@expandvsloop\expandafter{\poemvsindentlines}%
\def\@currentlabel{\thepoemline}%
\phantomsection%
}%
\let\poemendpart\poem@endpart
\def\poem@endpart{\enlargethispage{\baselineskip}\poem@endline}
\makeatother
\begin{document}
Some text.
\vspace{16.2cm} % Force poem down page
\poem
Some poetry\\
A metaphor here,\\
A metaphor there.\\!
Here begins another stanza\\
More words.\\!
The final stanza\\
A final metaphor\\*
The end\\-
\clearpage
Some text.
\vspace{16.2cm} % Force poem down page
\poem
Some poetry\\
A metaphor here,\\
A metaphor there.\\!
Here begins another stanza\\
More words.\\!
The final stanza\\
A final metaphor\\
The end\\-
\end{document}
\documentclass
and ending with\end{document}
, boiled down to as small a size as possible to demonstrate the actual issue at hand.