Often quotations are set with the attribution aligned right:
The attribution is on a new line after the quotation. Suppose however, that there were enough empty space on the last line of the quotation to hold the attribution. Then we might want it to be on the same line to avoid excessive whitespace.
We would want to define a command (call it quoteattr
) that calculates whether the quotation will fit and will place it accordingly, automatically.
Code without command definition:
\documentclass[12pt]{book}
\begin{document}
\quoteattr{Early to bed and early to rise,\\
Makes a man healthy, wealthy, and wise.}{Benjamin Franklin, 1706--1790}
\quoteattr{Seek not the favor of the multitude; it is seldom got by honest and lawful means. But seek the testimony of few; and number not voices, but weigh them.}{Immanuel Kant, 1724--1804}
\end{document}
Best Answer
It appears that the
tabto
package can help in this regard.