Skip to main content
Source Link
barbara beeton
  • 89.8k
  • 2
  • 41
  • 86

Code copied from Problem with formatting tables with equal column widths which had double backslashes trashed in earlier update.

    \begin{table}[h]
        \caption{Distribution of mappings for the SLA parameter $\pi$.}
        \label{tab:distPi} \centering
        \begin{tabular*}{0.45\textwidth}{@{\extracolsep{\fill}}|c|c|c|}
            \hline
                \multicolumn{3}{|c|}{\textbf{Name of the SLA parameter $\pi$}} \\
            \hline
                \emph{Cost} & \emph{Charge} & \emph{Rate} \\
            \hline
                15\% & 15\% & 40\% \\
            \hline
            \hline
                \multicolumn{3}{|c|}{\textbf{Unit of the SLA parameter $\pi$}} \\
            \hline
                \emph{USD} & \emph{GBP} & \emph{YPI} \\
            \hline
                38\% & 2\% & 40\% \\
            \hline
        \end{tabular*}
        \vspace{-0.3cm}
    \end{table}

and this is how I've made the second table:

    \begin{table}[h]
        \caption{Distribution of mappings for the SLA parameter $\mu$.}
        \label{tab:distMu} \centering
        \begin{tabular*}{0.45\textwidth}{@{\extracolsep{\fill}}|c|c|c|c|c|c|}
            \hline
                \multicolumn{6}{|c|}{\textbf{Name of the SLA parameter $\mu$}} \\
            \hline
                \multicolumn{3}{|c|}{\emph{MemoryConsumption}} & \multicolumn{3}{|c|}{\emph{Consumption}} \\
            \hline
                \multicolumn{3}{|c|}{70\%} & \multicolumn{3}{|c|}{30\%} \\
            \hline
            \hline
                \multicolumn{6}{|c|}{\textbf{Unit of the SLA parameter $\mu$}} \\
            \hline
                \multicolumn{2}{|c|}{\emph{Mbit}} & \multicolumn{2}{|c|}{\emph{Gbit}} & \multicolumn{2}{|c|}{\emph{Tbit}} \\
            \hline
                \multicolumn{2}{|c|}{5\%} & \multicolumn{2}{|c|}{55\%} & \multicolumn{2}{|c|}{40\%} \\
            \hline
        \end{tabular*}
        \vspace{-0.3cm}
    \end{table}
Post Made Community Wiki by barbara beeton