LaTeX list environment inside tabular environment: extra line up, preventing alignment
I have a LaTeX question that is bugging me. I am trying to get the list environment to display correctly inside a tabular environment. So far I've got everything on my own except one: the top of the list is not the same as the other table elements, it actually looks like it adds one row above the list ... I would like to have these lists at the top. This is what I have, a normal list environment:
\newenvironment{flushemize}{
\begin{list}{$\bullet$}
{\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
\setlength{\partopsep}{0pt}
\setlength{\topsep}{0pt}
\setlength{\leftmargin}{12pt}}}{\end{list}}
Renamed in broken order:
\newcommand{\rr}{\raggedright}
and here is my table:
\begin{table}[H]\caption{Tank comparisons}\label{tab:tanks}
\centering
\rowcolors{2}{white}{tableShade}
\begin{tabular}{p{1in}p{1.5in}p{1.5in}rr}
\toprule
{\bf Material} & {\bf Pros} & {\bf Cons} & {\bf Size} & {\bf Cost} \\
\midrule
\rr Reinforced concrete &\rr \begin{flushemize}\item Strong \item Secure \end{flushemize}&\rr \begin{flushemize}\item Prone to leaks \item Relatively expensive to install \item Heavy \end{flushemize} & 100,000 gal & \$299,400 \\
\rr Steel & \begin{flushemize}\item Strong \item Secure \end{flushemize} & \begin{flushemize}\item Relatively expensive to install \item Heavy \item Require painting to prevent rusting \end{flushemize} & 100,000 gal & \$130,100 \\
\rr Polypropylene & \begin{flushemize}\item Easy to install \item Mobile \item Inexpensive \item Prefabricated \end{flushemize} & \begin{flushemize}\item Relatively insecure \item Max size available 10,000 gal \end{flushemize} & 10,000 gal & \$5,000 \\
\rr Wood & \begin{flushemize}\item Easy to install \item Mobile \item Cheap to install \end{flushemize} & \begin{flushemize}\item Prone to rot \item Must remain full once constructed \end{flushemize} & 100,000 gal & \$86,300\\
\bottomrule
\end{tabular}
\end{table}
Update
Thanks to Little Bobby Tables and Charles Stewart for your answers. I've tried both of your suggestions and unfortunately couldn't get them to work.
In the tweaklist, I tried:
...
\usepackage{tweaklist}
\renewcommand{\enumhook}{\setlength{\topsep}{0pt}
\setlength{\itemsep}{0pt}}
\begin{document}
\begin{table}[H]
\centering
\begin{tabular}{lp{2in}l}
blah & \begin{itemize}\item One \item Two\end{itemize} & blah \\
blah & blah & blah \\
\end{tabular}
\end{table}
...
and for paralysis I tried:
...
\usepackage{paralist}
\begin{document}
\begin{table}[H]
\centering
\begin{tabular}{lp{2in}l}
blah & \begin{compactitem}\item One \item Two\end{compactitem} & blah \\
blah & blah & blah \\
\end{tabular}
\end{table}
...
Let me know if I missed something, I tried to use the documentation supplied with the packages as best I could.
source to share
Unfortunately, your change to topsep will not take effect as the dimension was already in use when your definition was used. Take a look at the Jason Schiøtz tweaklist
package , which sets up list environments to ensure that these definitions happen in a timely manner.
I had this exact problem for years before I realized what was going on ...
source to share