0

Having been guided by the wisdom of those more experienced than me, I have been using this answer to my previous question to change all my tables into ones that look better using booktabs. One of my tables is giving me some grief. The vertical alignment of one of my header row cells is off, and I have no idea why.

\documentclass[12pt, a4paper, oneside, fleqn]{report}
\usepackage{geometry}
\geometry{
  top=2.5cm,
  left=3.5cm,
  bottom=2.5cm,
  right=2.5cm,
  includehead,
  headheight=28pt,
  headsep=18pt,
  showframe,
}

\usepackage{array,booktabs}

\renewcommand{\arraystretch}{1.5}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}} 

\newcommand{\headrow}[1]{%
  \bfseries
  \begin{tabular}{@{}c@{}}
  \strut#1\strut
  \end{tabular}%
}

\begin{document}

\begin{table}
\footnotesize
\centering
  \begin{tabular}[t]{ l L{5cm} L{3cm} L{3.5cm} }
    \toprule
          & \headrow{Instrument Name}  & \headrow{Instrument Type} & \headrow{Main Purpose} \\
    \midrule
    IASI  & Infrared Atmospheric Sounding Interferometer & IR interferometer & Atmospheric temperature and humidity profiles; trace gases \\
    AMSU  & Advanced Microwave Sounding Unit & Microwave radiometer & Atmospheric temperature \\
    MHS   & Microwave Humidity Sounder       & Microwave radiometer & Atmospheric humidity    \\

    \bottomrule
  \end{tabular}
  \caption{My table of instruments}
\end{table}

\end{document}

Gives the following output. Why is the middle one bottom aligned?

tbale

1 Answer 1

1

Just playing with your MWE shows that the column seems to be too narrow. Allowing more space for the second column aligns it to the top again.

Unfortunately I don't know why this happens, but it gives you the opportunity to fix the issue by enlarging the column to 3.1cm.

1
  • Oh yes, you're right. Very odd. I'm surprised I didn't stumble across that solution myself - I almost gave it some extra width anyway a few seconds ago! Well, easily fixed anyway, thanks for having a play!
    – FionaSmith
    May 26, 2014 at 14:24

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .