The Quotation Environment

The quoting package is very useful, together with a trick found in the TeXbook (look for Bourbaki in the index).

\documentclass{article}
\usepackage{quoting,xparse}

\NewDocumentCommand{\bywhom}{m}{% the Bourbaki trick
  {\nobreak\hfill\penalty50\hskip1em\null\nobreak
   \hfill\mbox{\normalfont(#1)}%
   \parfillskip=0pt \finalhyphendemerits=0 \par}%
}

\NewDocumentEnvironment{pquotation}{m}
  {\begin{quoting}[
     indentfirst=true,
     leftmargin=\parindent,
     rightmargin=\parindent]\itshape}
  {\bywhom{#1}\end{quoting}}

\begin{document}

This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
\begin{pquotation}{Jack Johnson, 2003}
`This is a quotation. This is a quotation.
This is a quotation. This is a quotation.
This is a quotation. This is a quotation.
This is a quotation. This is a quotation.
This is a quotation.'
\end{pquotation}
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
\begin{pquotation}{Jack Johnson, 2003}
`This is a quotation. This is a quotation.
This is a quotation. This is a quotation.
This is a quotation. This is a quotation.
This is a quotation. This is a quotation.
This is a quotation. This is a quotation.'
\end{pquotation}
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.
This is not a quotation, this is normal text.

\end{document}

enter image description here


Here's a solution based on the csquotes package:

enter image description here

\documentclass{memoir}
% filler text:
\newcommand\lipx{Lorem ipsum dolor sit amet, 
consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, 
felis. Curabitur dictum gravida mauris. Nam 
arcu libero, nonummy eget, consectetuer id, 
vulputate a, magna.}

\usepackage{csquotes}
\SetBlockThreshold{2}
\newcommand\myblockquote[2]{%
  \blockquote{\hspace*{2em}\emph{`#1'}\hfill(#2)}\par}

\begin{document}
\lipx\ \lipx

\myblockquote{\lipx}{Jack Johnson, 2003}

\lipx\ \lipx
\end{document}

Tags:

Environments