Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer
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. –  Schweinebacke Nov 8 '11 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. –  MerseyViking Nov 8 '11 at 13:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.