Skip to main content
added 472 characters in body
Source Link
AboAmmar
  • 47.7k
  • 4
  • 65
  • 133

You can use tabularx to benefit from all the available hspace. The column with long text can be set X, columns with shorter wrapping text can be set as m{..}, all other columns can be set l. To center any cell use \multicolumn{1}{c|}{..}. Notice the line \renewcommand{\tabularxcolumn}[1]{m{#1}} which redefines X to behave like m. Finally remove \setlength{\tabcolsep}{25pt}, this is responsible for the extra padding to the left and right of cells.

\documentclass[12pt]{article} \usepackage{booktabs,tabularx} \begin{document} \begin{table}[!tbh] \centering \caption{Heuristic techniques}\label{title} %\setlength{\tabcolsep}{25pt} \renewcommand{\tabularxcolumn}[1]{m{#1}} \begin{tabularx}{\textwidth}{|m{1.5cm}|l|X|l|} \hline \textbf{\small Ref. no(s)} & \textbf{\small Objective(s)} & \multicolumn{1}{c|}{\textbf{\small Distinctive attributes}} & \textbf{\small Remarks} \\ \hline Hybrid fdfsadfafdsa \cite{8} & cost & comfortdsaladfjlafjdlkfjldafjdk fjldsajfdlfjdlf & asdf \\\hline hh \cite{9} & Cost & area & enhanced \\ \hline hh \cite{10} & Cost & problems & Practical\\\hline jj \cite{11} & Cost & simplicity & ignored\\\hline jjj\cite{12} & comfort & Cost & S \\\hline kk\cite{13} & Cost & integration & time \\\hline \end{tabularx} \end{table} \end{document} 

enter image description here

\documentclass[12pt]{article} \usepackage{booktabs,tabularx} \begin{document} \begin{table}[!tbh] \centering \caption{Heuristic techniques}\label{title} %\setlength{\tabcolsep}{25pt} \renewcommand{\tabularxcolumn}[1]{m{#1}} \begin{tabularx}{\textwidth}{|m{1.5cm}|l|X|l|} \hline \textbf{\small Ref. no(s)} & \textbf{\small Objective(s)} & \multicolumn{1}{c|}{\textbf{\small Distinctive attributes}} & \textbf{\small Remarks} \\ \hline Hybrid fdfsadfafdsa \cite{8} & cost & comfortdsaladfjlafjdlkfjldafjdk fjldsajfdlfjdlf & asdf \\\hline hh \cite{9} & Cost & area & enhanced \\ \hline hh \cite{10} & Cost & problems & Practical\\\hline jj \cite{11} & Cost & simplicity & ignored\\\hline jjj\cite{12} & comfort & Cost & S \\\hline kk\cite{13} & Cost & integration & time \\\hline \end{tabularx} \end{table} \end{document} 

enter image description here

You can use tabularx to benefit from all the available hspace. The column with long text can be set X, columns with shorter wrapping text can be set as m{..}, all other columns can be set l. To center any cell use \multicolumn{1}{c|}{..}. Notice the line \renewcommand{\tabularxcolumn}[1]{m{#1}} which redefines X to behave like m. Finally remove \setlength{\tabcolsep}{25pt}, this is responsible for the extra padding to the left and right of cells.

\documentclass[12pt]{article} \usepackage{booktabs,tabularx} \begin{document} \begin{table}[!tbh] \centering \caption{Heuristic techniques}\label{title} %\setlength{\tabcolsep}{25pt} \renewcommand{\tabularxcolumn}[1]{m{#1}} \begin{tabularx}{\textwidth}{|m{1.5cm}|l|X|l|} \hline \textbf{\small Ref. no(s)} & \textbf{\small Objective(s)} & \multicolumn{1}{c|}{\textbf{\small Distinctive attributes}} & \textbf{\small Remarks} \\ \hline Hybrid fdfsadfafdsa \cite{8} & cost & comfortdsaladfjlafjdlkfjldafjdk fjldsajfdlfjdlf & asdf \\\hline hh \cite{9} & Cost & area & enhanced \\ \hline hh \cite{10} & Cost & problems & Practical\\\hline jj \cite{11} & Cost & simplicity & ignored\\\hline jjj\cite{12} & comfort & Cost & S \\\hline kk\cite{13} & Cost & integration & time \\\hline \end{tabularx} \end{table} \end{document} 

enter image description here

Source Link
AboAmmar
  • 47.7k
  • 4
  • 65
  • 133

\documentclass[12pt]{article} \usepackage{booktabs,tabularx} \begin{document} \begin{table}[!tbh] \centering \caption{Heuristic techniques}\label{title} %\setlength{\tabcolsep}{25pt} \renewcommand{\tabularxcolumn}[1]{m{#1}} \begin{tabularx}{\textwidth}{|m{1.5cm}|l|X|l|} \hline \textbf{\small Ref. no(s)} & \textbf{\small Objective(s)} & \multicolumn{1}{c|}{\textbf{\small Distinctive attributes}} & \textbf{\small Remarks} \\ \hline Hybrid fdfsadfafdsa \cite{8} & cost & comfortdsaladfjlafjdlkfjldafjdk fjldsajfdlfjdlf & asdf \\\hline hh \cite{9} & Cost & area & enhanced \\ \hline hh \cite{10} & Cost & problems & Practical\\\hline jj \cite{11} & Cost & simplicity & ignored\\\hline jjj\cite{12} & comfort & Cost & S \\\hline kk\cite{13} & Cost & integration & time \\\hline \end{tabularx} \end{table} \end{document} 

enter image description here