如何修改引用环境周围的间距?

如何修改引用环境周围的间距?

我几乎已经完成了重现我正在翻译的书的相当紧凑的布局的任务......不过还有一件事要做:

我成功地使用该enumitem包修改了各种列表环境的垂直和水平间距。

但是我该如何修改环境的垂直和水平间距呢quotation?我已经找到了很多关于如何针对定理和公式等进行修改的信息,但这些似乎都不适用于quotation(或者quote,就此而言)。

\documentclass[twocolumn]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{enumitem}
\setlist{leftmargin=*,parsep=0pt,itemsep=2pt,topsep=2pt,partopsep=0pt}
\setlist[enumerate]{widest=0}

\newcommand{\sometext}{Some random text. Not using lipsum as I don't need that much text.}

\begin{document}
\sometext
\begin{itemize}
\item One item.
\item Another item.
\end{itemize}
\sometext
\begin{quotation}
\textbf{Note:} \emph{This has too much whitespace around it.}
\end{quotation}
\sometext
\end{document}

在此处输入图片描述

答案1

quoting包提供了一个quoting可定制字体、边距、间距的环境...只需加载\usepackage{quoting}并使用即可,\begin{quoting}[vskip=0pt] ... \end{quoting}或者使用以下命令进行全局设置\quotingsetup{vskip=0pt}

\documentclass[twocolumn]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{enumitem}
\setlist{leftmargin=*,parsep=0pt,itemsep=2pt,topsep=2pt,partopsep=0pt}
\setlist[enumerate]{widest=0}

\usepackage{quoting}
\quotingsetup{vskip=0pt}

\newcommand{\sometext}{Some random text. Not using lipsum as I don't need that much text.}

\begin{document}
\sometext
\begin{itemize}
\item One item.
\item Another item.
\end{itemize}
\sometext
\begin{quoting}
\textbf{Note:} \emph{This has no extra white\-space around it.}
\end{quoting}
\sometext
\end{document}

输出结果

答案2

\documentclass[twocolumn]{scrbook}
\makeatletter
\renewenvironment{quotation}
               {\list{}{\listparindent=0pt%whatever you need
                        \itemindent    \listparindent
                        \leftmargin=0pt%  whatever you need
                        \rightmargin=10pt%whatever you need
                        \topsep=0pt%%%%%  whatever you need
                        \parsep        \z@ \@plus\p@}%
                \item\relax}
               {\endlist}
\makeatother

\newcommand{\sometext}{Some random text. Not using lipsum as I don't need that much text.}

\begin{document}

\sometext
\begin{quotation}
\textbf{Note:} \emph{This has too much whitespace around it.}
\end{quotation}
\sometext
\end{document}

在此处输入图片描述

相关内容