Is there an elegant way to place the name of an author blow her/his poem or text (in an anthology of different authors)? The name should be flushed right, have vertical space (e.g. 1em), should not be break over pages and should not be a widow (last paragraph of the text and the author’s name should keep together).

1 Answer 1


You don't say how you are typesetting the poems, but the verse package includes the following suggestion for attributing the author :

  \nopagebreak{\raggedleft\footnotesize #1\par}}

This prevents a page break and typesets the author name flushright, in footnote size. It is used as \attrib{The author} immeadiately after the verse. You might want to remove the \footnotesize.

Widows may not be a problem. But to avoid widows generally, the first approach is to do something like


or some larger value (up to 10000, usually too severe, the standard value in the article class is 150). This can be localised to a part of the document by enclosing the relevant section (including paragraph endings) in brackets { ... }, or by switching backwards and forwards between different values. You can see the standard value in your class by writing \showthe\widowpenalty and reading the infomation this prints in the .log file.

Addendum The above will not give surefire solution though. It only suggests to LaTeX that breaks in these places are not to be prefereed. A good discussion of keeping things on one page can be found in the TeX FAQ. If you can package you poem with attribution in to a minipage, that will work well. The FAQ has discussion of the samepage environment of LaTeX, which is not infallible, and the use of \needspace, which requires some manual intervention to count a relevant number of lines.

Addendum 2 Experimenting shows that the suggested code works best inside the verse environment e.g. as

end of poem\\*
\attrib{The Poet}

and the macro definition can include vertical spacing:

  \vskip2ex\nopagebreak{\raggedleft\footnotesize #1\par}}

The catch is that this attribution is now flush right with the poems margin.

  • Thanks! I use your solution. Widows could be a problem if the poem is not typeset on a single page or in the case of usual Texts – right?
    – Ronny
    Aug 25, 2012 at 23:03
  • Yes, the widows problem is only if the poem (including attribution) spreads on to another page. Note the verse environment has the \\* line option, which also prevents line page breaks. Aug 27, 2012 at 18:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .