Graphics, Figures & TablesRow Spacing in Tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
thatoneguy
Posts: 1
Joined: Mon Jul 23, 2012 8:45 pm

Row Spacing in Tables

Post by thatoneguy »

Hi, I'm new to this forum but I've been using LaTeX for a few years now. I'm currently making a poster for school/work, and I'm having a problem with table row spacing. Specifically, I want to add a little bit of white space to the top of each cell in the table. But when I do that, the lines on the outside of the table ( The {|c | c | c |} lines, the vertical rules) do not scale accordingly.
To show you exactly what I mean, here is that portion of my code:

Code: Select all

\providecommand{\e}[1]{\ensuremath \times 10^{#1}}

\begin{tabular}{| c | c | c |}
\hline
\multicolumn{3}{| c |}{ Function of the form:}\\
\multicolumn{3}{| c |}{\hspace{3mm}$c_{0}+c_{1}(x-x_{c})+c_{2}(y-y_{c})+c_{3}(x-x_{c})^{2}+c_{4}(y-y_{c})^{2}+c_{5}(x-x_{c})(y-y_{c})$\hspace{3mm}}\\
\multicolumn{3}{| c |}{\vspace{-2mm}}\\
\hline
Variable & Assigned Value from Simulation & Fitted Value \\
\hline 
\noalign{\smallskip}$c_{0}$ & $0$ & $0.01005 \pm 6.08107 \e{-5}$  \\
\hline
\noalign{\smallskip}$c_{1}$ & $.001$ & $.00100 \pm 1.09939 \e{-7}$ \\
\hline
\noalign{\smallskip}$c_{2}$ & $.002$ & $.00200 \pm 1.09757 \e{-7}$ \\
\hline
$c_{3}$ & $9 \e{-7}$ & $8.99875 \e{-7} \pm 4.15653 \e{-10}$ \\
\hline
$c_{4}$ & $1.6 \e{-7}$ & $1.59903 \e{-7} \pm 4.15597 \e{-10}$ \\
\hline
\\[0.5cm]$c_{5}$ & $2.5 \e{-7}$ & $2.49560 \e{-7} \pm 3.70884 \e{-10}$ \\
\hline
\end{tabular}
I am working in the a0poster environment, though this problem isn't specific to that environment, I've experienced similar problems when working with the revtex4 environment as well.

The first 3 elements have the \noalign{\smallskip} thing; that provides the correct amount of whitespace, but look what it does to the vertical rules. The reason I need whitespace is, look at the exponents in the bottom 3 cells; it doesn't look quite right. This poster needs to look professional. I added in a different method of producing whitespace on the last row of cells. That has the same effect as \smallskip, but gives similar problems (except, some of the vertical rules scale, and some don't...)

I did not post my whole code because it is about 300 lines long. If it is necessary that I do post it, I can, I just wanted to avoid cluttering up this post unless it is necessary.

Does anyone know how I can fix this?

Thanks,
thatoneguy

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Row Spacing in Tables

Post by localghost »

thatoneguy wrote:[…] I did not post my whole code because it is about 300 lines long. If it is necessary that I do post it, I can, I just wanted to avoid cluttering up this post unless it is necessary. […]
Problems are best shown by a proper minimal example.

Take a look at the array package and it's \extrarowheight command. Possible solutions should be found by a Forum Search.


Best regards and welcome to the board
Thorsten
Post Reply