[Tex/LaTex] Table not fitting to column

tables

I have written code for a three column table, but it extends beyond the column margin. How can I fit it in the double column setting of my document.

\begin{table}
\centering
\begin{tabular}{|c|c|c| }
\hline
\textbf{Original Pair }&\textbf{ Mapped  Pair}&
\textbf{Favourable/Alternative}\\
\hline
 a,a & e,g & Favourable \\
 \hline
 b,b & e,c & Favourable\\
\hline
c,c & g,e & Favourable  \\ 
\hline 
d,d & h,f   & Favourable\\ 
\hline 
a,c & a,c & Favourable\\
\hline
c,a & c,a  & Favourable\\ 
\hline 
b,d & b,d & Favourable  \\
\hline 
d,b & d,b & Favourable   \\ 
\hline 
a,b & e,c & Alternative\\
\hline
a,d & a,g & Alternative  \\
\hline
 b,a & e,g & Alternative \\
\hline
b,c & a,c & Alternative\\
\hline
c,b & g,a  & Alternative \\ 
\hline 
c,d & c,e   & Alternative \\ 
\hline 
d,a & d,f  & Alternative  \\ 
\hline 
d,c & h,b  & Alternative \\ 
\hline 
\end{tabular}
\end{table}

Best Answer

You can use \begin{table*}...\end{table*}(note the *) to make the float take up both columns, or you can fit the float in one column using tabulary. For example:

enter image description here

\documentclass[twocolumn]{article}
\usepackage[tmargin=1cm]{geometry}
\usepackage{lipsum}
\usepackage{tabulary,booktabs}
\begin{document}
\lipsum[1]

\begin{table}[b]
\begin{tabulary}{\linewidth}{CCC}
\toprule
\textbf{Original Pair }&\textbf{ Mapped  Pair}&
\textbf{Favourable / Alternative}\\
\midrule
a,a & e,g & Favourable \\
a,b & e,c & Alternative\\
c,d & c,e   & Alternative \\ 
\bottomrule
\end{tabulary}
\end{table}

\begin{table*}
\centering
\begin{tabular}{ccc}
\toprule
\textbf{Original Pair }&\textbf{ Mapped  Pair}&
\textbf{Favourable/Alternative}\\
\midrule
a,a & e,g & Favourable \\
a,b & e,c & Alternative\\
c,d & c,e   & Alternative \\ 
\bottomrule
\end{tabular}
\end{table*}
\lipsum[2-50]

\end{document}
Related Question