# Add right flushed verse number to last line of verse

I'm using the custom Verse environment provided in this answer for producing horizontally centered verses.

I would like to add a verse number to the last line of a verse and I would like just the number to be flushed right (like equation numbering works). Here is an example:

I tried using flushright within the last line but it didn't work. Appreciate any pointers.

Absolutely no warranty! but since you asked for pointers, here is this.

\documentclass{article}
\usepackage{varwidth}
\newcounter{verse}
\setcounter{verse}{0}
\newenvironment{Verse}
{\refstepcounter{verse}
\equation
\let\theequation\theverse
\varwidth[b]{\linewidth}
}
{\endvarwidth
\endequation
}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{Verse}\label{me}
foo bar\\
baz
\end{Verse}
\lipsum[1]
\begin{Verse}
foo bar\\
baz \\
foo bar\\
baz
\end{Verse}
\end{document}


• @hashable although this centres each verse separately, unlike the image you showed (with no code) that centred the verses together so with their left edge aligned, do you need that? – David Carlisle Oct 26 '14 at 23:23