latex list environment inside the tabular environment: extra line at top preventing alignment
Posted
by Usagi
on Stack Overflow
See other posts from Stack Overflow
or by Usagi
Published on 2010-04-09T19:05:46Z
Indexed on
2010/04/11
13:23 UTC
Read the original article
Hit count: 543
Hello good people of stackoverflow. I have a LaTeX question that is bugging me. I have been trying to get a list environment to appear correctly inside the tabular environment. So far I have gotten everything to my liking except one thing: the top of the list does not align with other entries in the table, in fact it looks like it adds one line above the list... I would like to have these lists at the top. This is what I have, a custom 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 ragged right:
\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}
Thank you for any advice :)
© Stack Overflow or respective owner