4

I have tried all kinds of gimmicks, but I am stuck trying to reduce the double-spacing within the minibox to single space. (Obviously, I want to keep the global \onehalfspacing option.) This sounds trivial (and it probably is), but changing \parskip and \linespread seems to only to work for minipage --- I want to change this in a minibox environment --- what am I doing wrong here?

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

minibox is just a one column tabular so you can shrink it vertically with \arraystretch as it has been stretched already by the \onehalfspacing Also, don't leave a space before the % at end of line:

\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}
| improve this answer | |
  • Ah. My bad. The mind fills in the gaps. Erroneously in this case. I'll delete my comment. – Steven B. Segletes Dec 22 '14 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.