在整个页面宽度上使用大引号进行区块引用

在整个页面宽度上使用大引号进行区块引用

以下代码(来源) 非常漂亮,但我希望引用的文本占据整个页面的宽度。

我怎样才能实现这个目标?

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

答案1

添加到这些定义

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

并变成\begin{quote}\begin{xquote}同样\end{quote}变成\begin{xquote}

相关内容