5

I have two tables, one of which has two rows as a header. The first table's header looks something like this:

\toprule
\footnotesize\textsc{Stars}\\
\tiny{Name} & \tiny{SHA} & \tiny{Dec}\\
\midrule

I want the second table's header rows to be the same height, but with only the second line of text:

\toprule
\\
\tiny{Latitude}\\
\midrule

Because of the difference in text sizes between the two rows, PdfLaTeX makes the second table's top row narrower so the \midrule doesn't line up with the first table's. The contents of the tables are different enough that I can't just create one table.

Is there a way of determining a row's height, or should I create a box for each column of a fixed height?

1 Answer 1

6

You can start the second table with

\toprule
\vphantom{\footnotesize\textsc{Stars}}\\
\tiny{Latitude}\\
\midrule

With \vphantom only the height (and depth) will be considered and not the width.

2
  • 1
    Alternative to use \vphantom you may use \strut after (or - if you want more line space - before) \footnotesize at both tables to have a defined minimum height and depth. But the result needn't be the same! So try it out. Nov 8, 2011 at 13:12
  • Thanks @egreg and @Schweinebacke. Because this table is the exception, I've gone for the \vphantom option, but \strut does strike me as a neater way of doing it. Nov 8, 2011 at 13:40

You must log in to answer this question.

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