1

Inside a verse environment as provided by the verse package how would I align an entire stanza to the right? I'm looking for something like the below:

enter image description here

Neither \raggedleft nor \RaggedLeft as provided by ragged2e provide the intended result. Prepending \hfill to each line simply centers it.

  • Why do you want to use the verse environment specifically? Why not define a new rightverse (or whatever) environment? (Also, have you tried \hfilll instead of \hfill?) – ShreevatsaR Sep 22 '17 at 13:56
  • I'd like to be able to use multiple different alignments inside one environment if possible. I have not tried \hfilll as the solution I posted below solved it before I got any further. – miestasmia Sep 22 '17 at 14:04
1

This is not the most practical solution, but here's an attempt:

\documentclass{article}

\usepackage{verse}
\newlength\alignverserightwidth
\newcommand\alignverseright[1]{
    \settowidth{\alignverserightwidth}{#1}
    \hspace{\versewidth}\hspace{-\alignverserightwidth}#1
}

\begin{document}
    \settowidth{\versewidth}{it should}
    \begin{verse}[\versewidth]
        \alignverseright{This} \\
        \alignverseright{is} \\
        \alignverseright{how} \\
        \alignverseright{it should} \\
        \alignverseright{look} \\
    \end{verse}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.