
我嘗試過各種花招,但我一直試圖將迷你盒內的雙倍間距減少為單倍間距。 (顯然,我想保留全域 \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}