删除文本块内的间距

删除文本块内的间距

在下面的 MWE 中,我正在使用\parskip = \baselineskip但想要删除以下间距:

在此处输入图片描述

这是我的代码:

\documentclass[11pt]{book}

\usepackage{enumitem}
\setlist{nolistsep}
\usepackage{amsmath,amsfonts,amssymb,amsthm, bm}

\parskip = \baselineskip

\begin{document}
\chapter{Problems from Chapter 9}

\section{Problem 9-3}\index{Problem 9-3}

\subsection{Problem 9-3}
(Sorenson, 1980, Exercise 3-15, p. 130).  Suppose $\theta_{1}$ and $\theta_{2}$ are unbiased estimators of $\theta$ with var$(\theta_{1}) = \sigma_{1}^{2}$ and var$(\theta_{2}) = \sigma_{2}^{2}$.  Let $\theta_{3} = \alpha\theta_{1} + (1-\alpha)\theta_{2}$.
\noindent
\begin{enumerate}[align=left,style=nextline,leftmargin=*,labelsep=\parindent,label=\textbf{(\alph*)}]
\item Prove that $\theta_{3}$ is unbiased.
\item Assume that $\theta_{1}$ and $\theta_{2}$ are statically independent, and find the measured squared error of $\theta_{3}$.
\item What choice of $\alpha$ minimizes the mean-squared error?
\end{enumerate}

\end{document}

如何消除指示的间距?

答案1

第一个是子部分,因此您可以加载titlesec包并使用它titlespacing*

\usepackage{titlesec}
\titlespacing*{\subsection}{0pt}{0pt}{-10pt}

第三个参数是我设置的标题后面(下面)的空格-10pt。请随意调整。

对于第二个空格,您只能将原始值\parskip(即0pt plus 1pt)应用于enumerate

before=\setlength{\parskip}{0pt plus 1pt},align=left,....

在选项中。

\documentclass[11pt]{book}

\usepackage{enumitem}
\setlist{nolistsep}
\usepackage{amsmath,amsfonts,amssymb,amsthm, bm}

\parskip = \baselineskip


\usepackage{titlesec}
\titlespacing*{\subsection}{0pt}{0pt}{-10pt}




\begin{document}
\chapter{Problems from Chapter 9}

\section{Problem 9-3}\index{Problem 9-3}
\subsection{Problem 9-3}
(Sorenson, 1980, Exercise 3-15, p. 130).  Suppose $\theta_{1}$ and $\theta_{2}$ are unbiased estimators of $\theta$ with var$(\theta_{1}) = \sigma_{1}^{2}$ and var$(\theta_{2}) = \sigma_{2}^{2}$.  Let $\theta_{3} = \alpha\theta_{1} + (1-\alpha)\theta_{2}$.
%
\begin{enumerate}[before=\setlength{\parskip}{0pt plus 1pt},align=left,style=nextline,leftmargin=*, labelsep=\parindent,label=\textbf{(\alph*)}]
\item Prove that $\theta_{3}$ is unbiased.
\item Assume that $\theta_{1}$ and $\theta_{2}$ are statically independent, and find the measured squared error of $\theta_{3}$.
\item What choice of $\alpha$ minimizes the mean-squared error?
\end{enumerate}

\end{document}

您无需\parskip自行调整,而是可以使用parskip可提供更好间距的包。

\documentclass[11pt]{book}

\usepackage{enumitem}
\setlist{nolistsep}
\usepackage{amsmath,amsfonts,amssymb,amsthm, bm}

\usepackage[parfill]{parskip}


\begin{document}
\chapter{Problems from Chapter 9}

\section{Problem 9-3}\index{Problem 9-3}
\subsection{Problem 9-3}
(Sorenson, 1980, Exercise 3-15, p. 130).  Suppose $\theta_{1}$ and $\theta_{2}$ are unbiased estimators of $\theta$ with var$(\theta_{1}) = \sigma_{1}^{2}$ and var$(\theta_{2}) = \sigma_{2}^{2}$.  Let $\theta_{3} = \alpha\theta_{1} + (1-\alpha)\theta_{2}$.
%
\begin{enumerate}[align=left,style=nextline,leftmargin=*, labelsep=\parindent,label=\textbf{(\alph*)}]
\item Prove that $\theta_{3}$ is unbiased.
\item Assume that $\theta_{1}$ and $\theta_{2}$ are statically independent, and find the measured squared error of $\theta_{3}$.
\item What choice of $\alpha$ minimizes the mean-squared error?
\end{enumerate}

\end{document}

相关内容