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}
  • Indeed, it is very easy to fix : I delete the quote environment. – projetmbc Apr 30 '11 at 12:28
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}.

|improve this answer|||||
  • @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

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.