1

I am currently trying to place these tables neatly, but seem to have problem doing so..

\begin{tabular}{|c|c|c|}
\hline Word & No. times Action occured & Action  \\ 
\hline A & 4 & D  \\ 
\hline Eight & 2 & D  \\ 
\hline B & 1 & D \\ 
\hline C & 1 & D \\ 
\hline Eighty & 1 & D \\ 
\hline 
\end{tabular} 

\begin{tabular}{|c|c|c|}
\hline Word & No. times Action occured & Action  \\ 
\hline A & 4 & I  \\ 
\hline E & 3 & I  \\ 
\hline O & 3 & I \\ 
\hline Eight & 1 & I \\ 
\hline GO & 1 & I \\ 
\hline 
\end{tabular} 

\begin{tabular}{|c|c|c|c|}
\hline Word & No. times Action occured & Action & Output \\ 
\hline OH & 6 & S & O \\ 
\hline A & 5 & S & K\\ 
\hline D & 4 & S & T\\ 
\hline L & 4 & S & O\\ 
\hline M & 4 & S & N\\ 
\hline 
\end{tabular} 

How do position first two tables next to each other, and third one at the center under the first two..

So something like this:

enter image description here

Edit: Could subcaption and and a overall captioned be added to the tables, such that they can be crossreferenced individually, and reference them all serperately..

3

enter image description here

Your tables are quit wide, so I use `geometry package to make smaller margins on page. And note: empty line between table means that you require that next table should go to the next line:

\documentclass[12pt]{article}
\usepackage[margin=25mm]{geometry}

\begin{document}
    \begin{center}
\begin{tabular}{|c|c|c|}
\hline Word & No. times Action occured & Action  \\
\hline A & 4 & D  \\
\hline Eight & 2 & D  \\
\hline B & 1 & D \\
\hline C & 1 & D \\
\hline Eighty & 1 & D \\
\hline
\end{tabular}
\hfill
\begin{tabular}{|c|c|c|}
\hline Word & No. times Action occured & Action  \\
\hline A & 4 & I  \\
\hline E & 3 & I  \\
\hline O & 3 & I \\
\hline Eight & 1 & I \\
\hline GO & 1 & I \\
\hline
\end{tabular}

\medskip
\begin{tabular}{|c|c|c|c|}
\hline Word & No. times Action occured & Action & Output \\
\hline OH & 6 & S & O \\
\hline A & 5 & S & K\\
\hline D & 4 & S & T\\
\hline L & 4 & S & O\\
\hline M & 4 & S & N\\
\hline
\end{tabular} 
    \end{center}
\end{document}

You should consider that second column in table make narrower (if this allowed) by broken of column header into two lines:

enter image description here

\documentclass[12pt]{article}
\usepackage{makecell}
\renewcommand\theadfont{\normalsize}
\usepackage{caption}

\begin{document}
    \begin{table}
    \centering
\caption{my tables}
    \label{tab:table}
\begin{tabular}{|c|c|c|}
\hline \thead[b]{Word} & \thead{No. times\\ Action occurred} & \thead{Action}  \\
\hline A & 4 & D  \\
\hline Eight & 2 & D  \\
\hline B & 1 & D \\
\hline C & 1 & D \\
\hline Eighty & 1 & D \\
\hline
\end{tabular}
\hfil
\begin{tabular}{|c|c|c|}
\hline \thead[b]{Word} & \thead{No. times\\ Action occurred} & \thead{Action}  \\
\hline A & 4 & I  \\
\hline E & 3 & I  \\
\hline O & 3 & I \\
\hline Eight & 1 & I \\
\hline GO & 1 & I \\
\hline
\end{tabular}

\medskip
\begin{tabular}{|c|c|c|c|}
\hline \thead[b]{Word} & \thead{No. times\\ Action occurred} 
    & \thead{Action}    & \thead{Output}  \\
\hline OH & 6 & S & O \\
\hline A & 5 & S & K\\
\hline D & 4 & S & T\\
\hline L & 4 & S & O\\
\hline M & 4 & S & N\\
\hline
\end{tabular} 
    \end{table}
\end{document}

Addendum: considering your last comment and use subfig package. Similarly you can obtain with subcaption package, however it require to define table width in advance ... :

\documentclass[12pt]{article}
\usepackage{makecell}
\renewcommand\theadfont{\normalsize}
\usepackage{caption}
\usepackage{subfig}

\begin{document}
    \begin{table}
    \centering
\caption{my tables}
    \label{tab:table}
\subfloat[ table 1]{
\begin{tabular}{|c|c|c|}
\hline \thead[b]{Word} & \thead{No. times\\ Action occurred} & \thead{Action}  \\
\hline A & 4 & D  \\
\hline Eight & 2 & D  \\
\hline B & 1 & D \\
\hline C & 1 & D \\
\hline Eighty & 1 & D \\
\hline
\end{tabular}
}
\hfil
\subfloat[ table 2]{
\begin{tabular}{|c|c|c|}
\hline \thead[b]{Word} & \thead{No. times\\ Action occurred} & \thead{Action}  \\
\hline A & 4 & I  \\
\hline E & 3 & I  \\
\hline O & 3 & I \\
\hline Eight & 1 & I \\
\hline GO & 1 & I \\
\hline
\end{tabular}
}

\subfloat[ table 3]{
\begin{tabular}{|c|c|c|c|}
\hline \thead[b]{Word} & \thead{No. times\\ Action occurred} 
    & \thead{Action}    & \thead{Output}  \\
\hline OH & 6 & S & O \\
\hline A & 5 & S & K\\
\hline D & 4 & S & T\\
\hline L & 4 & S & O\\
\hline M & 4 & S & N\\
\hline
\end{tabular} 
}
    \end{table}
\end{document}

enter image description here

  • Thanks.. I will try it out, would adding caption interfere with the setup or? – dfh Dec 28 '16 at 16:02
  • @dfh, i will add caption ... – Zarko Dec 28 '16 at 16:10
  • I suck at this.. what about subcaptions.. Sorry for making all the chages.. – dfh Dec 28 '16 at 16:43
  • well, you should make your question more clear on very beginning ... :) – Zarko Dec 28 '16 at 17:07
  • Added it in the question.. – dfh Dec 28 '16 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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