tags:

views:

1134

answers:

2

I'm completely new to LaTeX and something I'm wanting to do is eluding me. Below, I have the code for two tables which appear side-by-side (which is what I wanted). But they're very close together, I'd like to have maybe an inch in-between the two tables. How would I achieve that effect?

     \begin{center}
      \begin{tabular}[t]{ c | c }
       $n$ &$f(n)$ \\ \hline
       1 & 6 \\
       2 & 7 \\
       3 & 6 \\
       4 & 7 \\
       5 & 6 \\
      \end{tabular}
      \begin{tabular}[t]{ c | c c c c c}
       $g$ &  6 &  7 &  8 &  9 & 10  \\ \hline
       1   & 10 & 10 & 10 & 10 & 10  \\
       2   &  7 &  8 &  9 & 10 &  6  \\    
       3   &  7 &  7 &  8 &  8 &  9  \\   
       4   &  9 &  8 &  7 &  6 & 10  \\   
       5   &  6 &  6 &  6 &  6 &  6  \\   
      \end{tabular}
     \end{center}
+4  A: 

You could insert \hspace{2em} between the tables. Change the value if you want more or less space.

Bob
\vspace{2em} went the wrong direction, but I took a guess and tried \hspace{2em}, and that produced the effect I wanted. Thanks!
Iain
2em is standard for a horizontal space between larger objects, e.g. formulas, so there is a macro for it, \qquad.
starblue
I replaced \hspace{2em} with \qquad it had equally nice result. Thanks for the tip!
Iain
A: 

Thank you for the tip.It is very useful.

but I took a guess and tried \hspace{2em}, and that produced the effect I wanted.