I have a macro that creates itemize environment in it.
The issue is that I have extra space after the itemize environment when used in longtable.
How to remove the space?
\documentclass{memoir}
\usepackage{enumitem}
\usepackage{longtable}
\usepackage{booktabs}
\newcommand{\fuda}[2]{%
Functions:%
\begin{itemize}[nosep]
#1%
\end{itemize}
Data:%
\begin{itemize}[nosep]
#2%
\end{itemize}
}
\begin{document}
\begin{longtable}{p{0.3\textwidth}|p{0.7\textwidth}}
\caption[List of components]{List of functions and data allocated to each component} \label{d_plan} \\
\toprule
\textbf{Components} & \textbf{Functions and Data} \\\midrule
\textbf{Registration} & \fuda{
\item Register capabilities of the device
\item Unregister capabilities of the device
\item Register context representation
}{
\item Interface List
\item Capability List
\item Protocol List
\item Representation List}
\\\bottomrule
\end{longtable}
\end{document}
ADDED
The solution that uses -\baselineskip:
works with article class, but not with memoir class.
Best Answer
A
p
column entry in a table ends with essentiallyso after your list you get a
\strut
added which appears on a newline. You can back-up with-\baselineskip
:The same applies to
p
cells in ordinary tables.Added in the
memoir
class the definition of\@endpbox
is a little difference and you will need to writeinstead of just the
\vspace*
command.