3

I have created a table with uneven mergers of cells:

\begin{table}
\centering
\begin{tabular}{|l|c|c|c|c|c|c|}
\hline
               & A               & B              & C         & D          & E              & F              \\ \hline
\textsc{baris} & \multicolumn{2}{c|}{bar=is}      & bar=o     & bar=u      & \multicolumn{2}{c|}{bar=um}     \\ \hline
\textsc{torun} & tor=un          & \multicolumn{2}{c|}{tor=e} & \multicolumn{2}{c|}{tor=us} & tor=um         \\ \hline
…              & …               & …              & …         & …          & …              & …              \\ \hline
\end{tabular}
\end{table}

This is the result:

enter image description here

As you can see, every second cell of a merged couple has a shorter width. Is there a simple way to make them of the same width?

Thanks to everyone

2 Answers2

3

Like this, i.e. that all columns (except the first) has equal width?

enter image description here

\documentclass{article}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document} \begin{table} \centering \begin{tabularx}{0.9\linewidth}{|l|*{6}{C|} } \hline & A & B & C & D & E & F \ \hline \textsc{baris} & \multicolumn{2}{c|}{bar=is} & bar=o & bar=u & \multicolumn{2}{c|}{bar=um} \ \hline \textsc{torun} & tor=un & \multicolumn{2}{c|}{tor=e} & \multicolumn{2}{c|}{tor=us} & tor=um \ \hline … & … & … & … & … & … & … \ \hline \end{tabularx} \end{table} \end{document}

Addendum: Some off-topic improvements of table (more vertical spaces around cell contents, use of option for \schape text, newcommand for \multicolumn{2}{c|}{...}, ... are replaced with \dots):

\documentclass{article}
\usepackage{makecell, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcommand\mcc[1]{\multicolumn{2}{c|}{#1}}

\begin{document} \begin{table} \centering \setcellgapes{2pt} \makegapedcells \begin{tabularx}{0.9\linewidth}{|>{\scshape}l|*{6}{C|} } \hline & A & B & C & D & E & F \ \hline baris & \mcc{bar=is} & bar=o & bar=u & \mcc{bar=um} \ \hline torun & tor=un & \mcc{tor=e} & \mcc{tor=us} & tor=um \ \hline \dots & \dots & \dots & \dots & \dots & \dots & \dots \ \hline \end{tabularx} \end{table} \end{document}

enter image description here

Zarko
  • 296,517
3

enter image description here

\documentclass{article}
\usepackage{array}
\begin{document}

\begin{table} \centering \begin{tabular}{|l|*{6}{wc{1cm}|}} \hline & A & B & C & D & E & F \ \hline \textsc{baris} & \multicolumn{2}{c|}{bar=is} & bar=o & bar=u & \multicolumn{2}{c|}{bar=um} \ \hline \textsc{torun} & tor=un & \multicolumn{2}{c|}{tor=e} & \multicolumn{2}{c|}{tor=us} & tor=um \ \hline … & … & … & … & … & … & … \ \hline \end{tabular} \end{table}

\end{document}

leandriis
  • 62,593