I am trying make the width of the columns below Very very long name the same (G1 and G2).
The one on the top is created by using tabular and the other one is created with tabularx.
I have seen similar questions, but could not apply their solutions to my case.
\documentclass{article}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{tabularx}
\begin{document}
\begin{table}[ht]
\centering
\resizebox{\textwidth}{!}{
\renewcommand{\arraystretch}{1.5} % Default value: 1
\begin{tabular}{lcccccc}
\multicolumn{7}{c}{\textbf{ABC Metrics}} \\ \hline
\multicolumn{1}{|l|}{\textbf{Algorithm}} & \multicolumn{2}{c|}{\textit{Very very long name}} & \multicolumn{2}{c|}{\textit{Very very long name}} & \multicolumn{2}{c|}{\textit{Very very long name}} \\ \hline
\multicolumn{1}{|l|}{\textbf{Graph}} & \multicolumn{1}{c|}{$G_1$} & \multicolumn{1}{c|}{$G_2$} & \multicolumn{1}{c|}{$G_1$} & \multicolumn{1}{c|}{$G_2$} & \multicolumn{1}{c|}{$G_1$} & \multicolumn{1}{c|}{$G_2$} \\ \hline
\end{tabular}}
\end{table}
\begin{tabularx}{\textwidth}{XXXXXXX}
\multicolumn{7}{c}{\textbf{ABC Metrics}} \\ \hline
\multicolumn{1}{|l|}{\textbf{Algorithm}} & \multicolumn{2}{c|}{\textit{Very very long name}} & \multicolumn{2}{c|}{\textit{Very very long name}} & \multicolumn{2}{c|}{\textit{Very very long name}} \\ \hline
\multicolumn{1}{|l|}{\textbf{Graph}} & \multicolumn{1}{c|}{$G_1$} & \multicolumn{1}{c|}{$G_2$} & \multicolumn{1}{c|}{$G_1$} & \multicolumn{1}{c|}{$G_2$} & \multicolumn{1}{c|}{$G_1$} & \multicolumn{1}{c|}{$G_2$} \\ \hline
\end{tabularx}
\end{document}





\resizeboxin order to make a tabl fit into the textwidth leads to inconsistent font sizes. – leandriis Jun 26 '18 at 13:38