Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

1 Answer

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}.

share|improve this answer
    
Thanks, that's better ! –  projetmbc Apr 30 '11 at 13:02
    
@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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.