2

the following code (source) is very pretty but I would like the text quoted to occupy all the width of the page.

How can I achieve this ?

    \documentclass[12pt]{article}
    \usepackage[T1]{fontenc}
    \usepackage{libertine}
    \usepackage{graphicx}
    \usepackage[svgnames]{xcolor}
    \usepackage{framed}

    \newcommand*\openquote{%
        \makebox(25,-22){\scalebox{5}{``}} 
    }
    \newcommand*\closequote{ %
        \makebox(25,-22){\scalebox{5}{''}}
    }
    \colorlet{shadecolor}{lightgray}

    \makeatletter
        \newif\if@right
        \def\shadequote{\@righttrue\shadequote@i}
        \def\shadequote@i{\begin{snugshade}\begin{quote}\openquote}
        \def\endshadequote{%
            \if@right\hfill\fi\closequote\end{quote}\end{snugshade}}
            \@namedef{shadequote*}{\@rightfalse\shadequote@i}
        \@namedef{endshadequote*}{\endshadequote}
    \makeatother


\begin{document}

    \begin{shadequote}
        Some quoted words
    \end{shadequote}

    \begin{shadequote*}
        Some quoted words
    \end{shadequote*}

    \begin{shadequote}
        A common mistake that people make when trying to design something
        completely foolproof is to underestimate the ingenuity of complete fools.

        \par \emph{Douglas Adams}
    \end{shadequote}

\end{document}
projetmbc
  • 13,315

1 Answers1

6

Add to those definitions

\newenvironment{xquote}
  {\list{}{\leftmargin=0pt\rightmargin\leftmargin}\item\relax}
  {\endlist}

and change \begin{quote} into \begin{xquote} and similarly \end{quote} into \begin{xquote}.

egreg
  • 1,121,712
  • @projectmbc: rather than comment, it's better for future readers to vote up an answer, marking it as accepted when you're sure it does what you were looking for. – egreg Apr 30 '11 at 13:08
  • projetmbc hasn't enough reputation yet to upvote. – lockstep Apr 30 '11 at 17:59