[Tex/LaTex] Adding an extra column to an existing table

tables

I have found very nice ways to change the order of the columns of a table.

But is there any simple solution to add new columns to an existing table? I have columns from a table that I want want insert into another table (with the same number of rows).

This is the table I have:

\begin{table}[ht]
\centering
\begin{tabular}{rlrrrrr}
  \hline
 & Country & y & nx & c & x & g \\ 
  \hline
1 & Australia & 1.32 & 2.68 & 0.83 & 2.98 & 1.27 \\ 
  2 & Austria & 1.24 & 2.55 & 0.94 & 2.65 & 0.68 \\ 
  3 & Canada & 1.36 & 2.79 & 0.81 & 2.93 & 1.04 \\ 
  4 & European Union (15 countries) & 1.07 & 2.84 & 0.72 & 2.44 & 0.53 \\ 
  5 & France & 1.12 & 2.44 & 0.79 & 2.30 & 0.58 \\ 
  6 & Germany & 1.58 & 1.02 & 0.77 & 2.57 & 0.86 \\ 
  7 & Italy & 1.46 & 1.13 & 0.87 & 2.55 & 0.58 \\ 
  8 & Japan & 1.56 & 1.79 & 0.79 & 2.22 & 0.74 \\ 
  9 & Switzerland & 1.66 & 1.63 & 0.64 & 2.36 & 0.92 \\ 
  10 & United Kingdom & 1.48 & 1.50 & 1.08 & 2.58 & 0.84 \\ 
  11 & United States & 1.63 & 1.63 & 0.77 & 2.48 & 0.85 \\ 
   \hline
\end{tabular}
\end{table}

Best Answer

If the two tabular environments have the exact same (vertical) format, all you need to do is to write one environment immediately after the other, making sure there's no space between the two. The "no space" requirement is achieved by terminating the first tabular environment with a % (comment) character.

enter image description here

\documentclass{article}
\begin{document}

\begin{table}[ht]
\centering
\begin{tabular}{rlrrrrr}
  \hline
  & Country & y & nx & c & x & g \\ 
  \hline
  1 & Australia & 1.32 & 2.68 & 0.83 & 2.98 & 1.27 \\ 
  2 & Austria & 1.24 & 2.55 & 0.94 & 2.65 & 0.68 \\ 
  3 & Canada & 1.36 & 2.79 & 0.81 & 2.93 & 1.04 \\ 
  4 & EU (15 countries) & 1.07 & 2.84 & 0.72 & 2.44 & 0.53 \\ 
  5 & France & 1.12 & 2.44 & 0.79 & 2.30 & 0.58 \\ 
  6 & Germany & 1.58 & 1.02 & 0.77 & 2.57 & 0.86 \\ 
  7 & Italy & 1.46 & 1.13 & 0.87 & 2.55 & 0.58 \\ 
  8 & Japan & 1.56 & 1.79 & 0.79 & 2.22 & 0.74 \\ 
  9 & Switzerland & 1.66 & 1.63 & 0.64 & 2.36 & 0.92 \\ 
  10 & United Kingdom & 1.48 & 1.50 & 1.08 & 2.58 & 0.84 \\ 
  11 & United States & 1.63 & 1.63 & 0.77 & 2.48 & 0.85 \\ 
  \hline
  \end{tabular}%  <-- note the "%" symbol
\begin{tabular}{r}
\hline
abc\\
\hline
0.01 \\ 0.02 \\ 0.03 \\ 0.04 \\ 0.05 \\ 0.06 \\
0.07 \\ 0.08 \\ 0.09 \\ 0.10 \\ 0.11 \\
\hline
\end{tabular}
\end{table}

\end{document}
Related Question