It is possible to squeeze the table inside the standard margins, if you want. I have reduced tabcolsep
and removed vertical rules. Since the table was too wide due to the headers, I added the common part of the header on a line for itself, and reduced the fontsize. I assumed this did not change the meaning, but if I am wrong, this is not the path to go. If possible for you, you could also abbreviate #input
and #output
to #in
and #out
The five last columns, I typeset with fixed width, using array and w
-columns.
I have made three examples, one with vertical rules, and one without and one with the headings you have in your table, except that I have removed the bold and reduced the font size to reduce the size of the header:
Example 1: booktabs version
In addition I did the usual thing to make the table readable: boooktabs rules, grouping the rows by small white space, removing the left and right side bearings (@{}
).
If your table has a caption, I suggest using threeparttable, which automatically ensure that table and caption is of same with, if the caption is multiline. caption will help you formatting the captions. And column with only numbers should be right aligned (col 2 to col 6):

\documentclass[12pt]{article}
\usepackage{array, booktabs, caption, threeparttable}
\setlength{\tabcolsep}{0.5em}
\begin{document}
\begin{table}
\centering
\begin{threeparttable}
\caption{A table is much nicer if you use booktabs and remove vertical rules. threepartable ensure that caption and table is of the same length}
\begin{tabular}{@{}lrrr*{2}{wr{\dimexpr(1.15cm-(2\tabcolsep))}}*{3}{wc{\dimexpr(1.15cm-(2\tabcolsep))}}}
\toprule
&&&&\multicolumn{5}{>{\centering\arraybackslash}p{5.71cm}}{\small\bfseries BCLP}\\ \cmidrule(l{\tabcolsep}){5-9}
\small\textbf{Benchmark} & \small\textbf{\#input} & \small\textbf{\#output} & \small\textbf{SOP} & \multicolumn{1}{c}{\small\bfseries 1} & \multicolumn{1}{c}{\small\bfseries 2} & \multicolumn{1}{c}{\small\bfseries 3} & \multicolumn{1}{c}{\small\bfseries 4} & \multicolumn{1}{c}{\small\bfseries 5}\\
\midrule
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\\addlinespace
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\\addlinespace
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
\bottomrule
\end{tabular}
\end{threeparttable}
\end{table}
\end{document}
Example 2: vertical rules
In this example, I had to decrease the tabcolsep
further to 0.411em
, because the vertical rules need the side bearings. I also added 2 pt to the rows height to avoid the collision between horizontal rules and the content of he cells.

\documentclass[12pt]{article}
\usepackage{array}
\begin{document}
\begin{table}
\setlength{\extrarowheight}{2pt}
\setlength{\tabcolsep}{0.413em}
\centering
\begin{tabular}{|l|*{5}{r|}*{3}{c|}}
\hline
&&&&\multicolumn{5}{>{\centering\arraybackslash}p{5cm}|}{\small\bfseries BCLP}\\ \cline{5-9}
\small\textbf{Benchmark} & \small\textbf{\#input} & \small\textbf{\#output} & \small\textbf{SOP} & \multicolumn{1}{c|}{\small\bfseries 1} & \multicolumn{1}{c|}{\small\bfseries 2} & \multicolumn{1}{c|}{\small\bfseries 3} & \multicolumn{1}{c|}{\small\bfseries 4} & \multicolumn{1}{c|}{\small\bfseries 5}\\
\hline
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\[1ex]
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\[1ex]
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
\hline
\end{tabular}
\end{table}
\end{document}
Example 3: With original table headings
tabolsep
is further decreased. Fontsize in header smaller.

\documentclass[12pt]{article}
\usepackage{array}
\begin{document}
\begin{table}
\setlength{\extrarowheight}{2pt}
\setlength{\tabcolsep}{0.3em}
\centering
\rule{\linewidth}{2pt}
\bigskip
\begin{tabular}{|l|*{5}{r|}*{3}{c|}}
\hline
\footnotesize Benchmark & \footnotesize \#input & \footnotesize \#output & \footnotesize SOP & \multicolumn{1}{c|}{\footnotesize BCLP-1} & \multicolumn{1}{c|}{\footnotesize BCLP-2} & \multicolumn{1}{c|}{\footnotesize BCLP-3} & \multicolumn{1}{c|}{\footnotesize BCLP-4} & \multicolumn{1}{c|}{\footnotesize BCLP-5}\\
\hline
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\[1ex]
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\[1ex]
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
alu4.pla & 14 & 8 & 575 & 923 & 921 & XXX & YYY & ZZZ\\
accpla.pla & 50 & 69 & 175 & 1457 & 1458 & XXX & YYY & ZZZ\\
\hline
\end{tabular}
\end{table}
\end{document}
\documentclass
and ends with\end{document}
and produces this table such that others can help you. Answers will depend on the layout of your document.\centerline{ \begin{tabular}{|l|c|c|c|c|c|c|c|c|} ... \end{tabular}}
but you really don't want to go there. Instead rotate the elements of the first row.\usepackage{graphicx}
and use\rotatebox
. A more detailed reply requires a complete document to test that what one has done is sufficient.