0

The merged rows are not vertically aligned, and the text overlaps with the next column. What should I do to fix this?

enter image description here

w_i should be in the second column. There are two multirows should be aligned vertically. One is Normal returns and another is Normal Mixture returns.

\begin{table}[h!]
\centering
 \begin{tabular}{c c c c} 
 \hline
 $\omega$ & M=4 & M=5 & M=6 \\ [0.5ex] 
 \hline\hline
 \multirow{3}{*}{Normal returns}
 $\omega_1$ & 28.96 & 28.96 & 28.96 \\ 
 $\omega_2$ & 47.50 & 47.50 & 47.49 \\
 $\omega_3$ & 23.54 & 23.54 & 23.55 \\ [1ex] 
 \multirow{3}{*}{Normal Mixture returns}
 $\omega_1$ & 26.33 & 27.45 & 28.62 \\ 
 $\omega_2$ & 48.13 & 48.15 & 47.57 \\
 $\omega_3$ & 25.54 & 24.40 & 23.82 \\ [1ex] 
 \hline
 \end{tabular}
\end{table}
  • What should be aligned. I fear you misuse multirow. – Bernard Apr 23 '18 at 23:41
  • Sorry I made a typo, it's now fixed – ZHU Apr 23 '18 at 23:45
  • I don't understand what you try to obtain. Didn't test it yet, but this code shouldn't compile. The ω_i are supposed to be in the same columns as the multirow? – Bernard Apr 23 '18 at 23:51
  • No, w_i should be in the second column. There are two multirows should be aligned vertically. One is Normal returns and another is Normal Mixture returns – ZHU Apr 23 '18 at 23:57
  • This makes 5 columns. You declare 4. – Bernard Apr 24 '18 at 0:12
1

I propose this:

\documentclass{article}
\usepackage{array, multirow, makecell, booktabs}
\usepackage[showframe]{geometry}


\begin{document}

\begin{table}[h!]
\centering
\begin{tabular}{*{5}{c}}
\toprule
& $\omega$ & M=4 & M=5 & M=6 \\
\midrule\midrule
\multirowcell{3}{Normal returns} &
$\omega_1$ & 28.96 & 28.96 & 28.96 \\
& $\omega_2$ & 47.50 & 47.50 & 47.49 \\
& $\omega_3$ & 23.54 & 23.54 & 23.55 \\ [1ex]
\multirowcell{3}{Normal Mixture\\ returns} &
$\omega_1$ & 26.33 & 27.45 & 28.62 \\
& $\omega_2$ & 48.13 & 48.15 & 47.57 \\
& $\omega_3$ & 25.54 & 24.40 & 23.82 \\
\bottomrule
\end{tabular}
\end{table}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.