迷你框内的段落间距

迷你框内的段落间距

我尝试过各种花招,但还是无法将 minibox 中的双倍行距减少到单倍行距。(显然,我想保留全局 \onehalfspacing 选项。)这听起来微不足道(可能确实如此),但更改 \parskip 和 \linespread 似乎仅适用于 minipage --- 我想在 minibox 环境中更改这一点 --- 我在这里做错了什么?

\documentclass{article}

\usepackage{setspace}
\onehalfspacing
\renewcommand{\arraystretch}{1}  % tables smaller spacing
\setlength{\tabcolsep}{5pt}

\usepackage{minibox}   % minipage without specific width

\begin{document}
\section{Immune System}

\newcommand{\belongs}[2] {  % \belongs
\noindent
\[
\minibox{#1}
\left \{
\minibox{#2}
\right .
\]
}

\noindent
\begin{minipage}{0.30\linewidth}
\belongs{antigen\\presenting\\cells}{
Macrophages \\
Dendritic cells \\
B cells}
\end{minipage}
\hfill
\begin{minipage}{0.30\linewidth}
\belongs{humoral\\response}{B cells}
\end{minipage}
\hfill
\begin{minipage}{0.30\linewidth}
\belongs{cell-mediated\\immunity}{
phagocytes \\
killer T cells \\
release of cytokines}
\end{minipage}

\end{document}

答案1

minibox只是一列tabular,因此您可以用它垂直收缩,\arraystretch因为它已经被拉伸了,另外,不要在行末\onehalfspacing 留空格:%

\documentclass{article}

\usepackage{setspace}
\onehalfspacing
\renewcommand{\arraystretch}{1}  % tables smaller spacing
\setlength{\tabcolsep}{5pt}

\usepackage{minibox}   % minipage without specific width

\begin{document}
\section{Immune System}

\newcommand{\belongs}[2] {% \belongs
\noindent
\[\renewcommand{\arraystretch}{.7}  
\minibox{#1}
\left \{
\minibox{#2}
\right .
\]%
}

\noindent
\begin{minipage}{0.30\linewidth}
\belongs{antigen\\presenting\\cells}{
Macrophages \\
Dendritic cells \\
B cells}
\end{minipage}
\hfill
\begin{minipage}{0.30\linewidth}
\belongs{humoral\\response}{B cells}
\end{minipage}
\hfill
\begin{minipage}{0.30\linewidth}
\belongs{cell-mediated\\immunity}{
phagocytes \\
killer T cells \\
release of cytokines}
\end{minipage}

\end{document}

相关内容