1

In second row and last entry "Synchronous Binary System" is touching table lines. Where should I place struts ? and how I can place "i" "j" and "k" at the center of merged row ?

\documentclass{article}
\usepackage{multirow}
\usepackage{pbox}%to break line with section
\usepackage{booktabs}
\usepackage[margin=1in,left=0.75in,right=0.75in]{geometry}
\begin{document}
\begin{flushleft}
\newcommand\T{\rule{0pt}{3.6ex}} % Top strut
\newcommand\B{\rule[-3.6ex]{0pt}{0pt}} % Bottom strut
\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline\T\B
\multirow{2}{*}{i} & \multirow{2}{*}{j} & \multirow{2}{*}{k} &       \multicolumn{5}{c|}{$A_{ij, k}^{*}$} \\ \cline{4-8}
              &                   &                   &   Undistorted&    \pbox{20cm}{Rotationally \\ Distorted}&    Tidally Distorted&    \pbox{20cm}{Rotationally\\Tidally Distorted}&  \pbox{20cm}{Synchronous\\ Binary \\System } \\ \hline
             2 &                  2 &                  1 &    7.2&    0.03&    1.9&    0.99&  -3.7 \\ \hline
             3 &                  3 &                  1 &    10.6&    -10.6&    1.43&    0.22&  -6.37 \\ \hline
\end{tabular}
\end{flushleft}
\end{document} 
1

I've added siunitx for the numbers alignment on decimal dot, in math mode, and some padding of rows, as your struts seemed to be deigned for that. Padding is realised here with cellspace package, which lets you define minimal vertical padding at the top and bottom of cells in columns with specifiers prefixed by the letter S, or, with siunitx, by the letter C. Also \ pboxis replaced withmakecell, which allows for line breaks via the\makecell,multirowcell` and a few other commands:

\documentclass{article}

\usepackage{booktabs, multirow, makecell, cellspace}
\setlength\cellspacetoplimit{8pt}
\setlength\cellspacebottomlimit{8pt}
\usepackage[margin=1in,left=0.75in,right=0.75in, showframe]{geometry}
\usepackage{siunitx}
\addparagraphcolumntypes{S}

 \begin{document}
\begin{flushleft}
\sisetup{table-format=1.2, table-number-alignment=center}
\begin{tabular}{|*{3}{Cc|}S[table-format=2.1]|S[table-format=-2.1]|S|S|S[table-format=-1.2]|}
\hline
\multirowcell{5}[0.5ex]{i} & \multirowcell{5}[0.5ex]{j} & \multirowcell{5}[0.5ex]{k} & \multicolumn{5}{Cc|}{$A_{ij, k}^{*}$}
 \\ \cline{4-8}
              & & & {Undistorted} & \multicolumn{1}{Cc|}{\makecell[l]{Rotationally \\ Distorted}} & {Tidally Distorted} & {\makecell[l]{Rotationally\\Tidally Distorted}}& {\makecell[l]{Synchronous\\ Binary System}} \\ \hline
             2 & 2 & 1 & 7.2& 0.03& 1.9& 0.99& -3.7 \\ \hline
             3 & 3 & 1 & 10.6& -10.6& 1.43& 0.22& -6.37 \\ \hline
\end{tabular}
\end{flushleft}
\end{document} 

enter image description here

  • Why are these extra borders? – IgotiT Aug 5 '16 at 1:36
  • 1
    The showframe option of geometry. I used it to check there was no overflow in the margin. Of course, it's to be removed in a final version. – Bernard Aug 5 '16 at 1:41
3

I honestly don't see the need for using multirow and your suggested alignment here. Consider using the updated table below:

enter image description here

\documentclass{article}

\usepackage{booktabs,makecell}
\usepackage[margin=1in]{geometry}

\begin{document}

\noindent
\begin{tabular}{ *{8}{c} }
  \toprule
   & & & \multicolumn{5}{c}{$A_{i,j,k}^*$} \\
  \cmidrule(lr){4-8}
  $i$ & $j$ & $k$ & Undistorted & \makecell[b]{Rotationally \\ Distorted} & \makecell[b]{Tidally \\ Distorted} & 
    \makecell[b]{Rotationally \\ Tidally Distorted} & \makecell[b]{Synchronous \\ Binary System} \\
  \midrule
  $2$ & $2$ & $1$ & $\phantom{1}7.2$ & $\phantom{-1}0.03$ & $1.9\phantom{3}$ & $0.99$ & $-3.7\phantom{7}$ \\
  $3$ & $3$ & $1$ & $ 10.6$ & $-10.6\phantom{3}$ & $1.43$ & $0.22$ & $-6.37$ \\
  \bottomrule
\end{tabular}

\end{document}

It should be clear to the reader that the parameters are i, j and k and that they will change the outcome of A_{i,j,k}^*.

I've aligned the numerical entries using some \phantoms, and stuck to a two-cell stacking for the second row, all of them being bottom-aligned (thanks to makecell).

  • 2
    If the output is really something you don't like, one could change it. But I'd suggest you consider the pure booktabs alternative. – Werner Aug 5 '16 at 0:44

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.