1

Consider this example:

\documentclass{article}
\usepackage{makecell}
%\usepackage{cellspace}                                                                                                                                                                                     
\usepackage{multirow}
\begin{document}
  \begin{tabular}{Sl Sl}
    a & \makecell{b}\\
    A & $\frac{1}{9}\times20$\\
    A & $\frac{1}{9}\times2000 + b$\\
  \end{tabular}
\end{document}

I use \makecell to override horizontal placement of a single cell. In the output I see that the mathematical formulae in different rows don't have enough space between them:

enter image description here

Following Modify arraystretch for a single row in table I use the cellspace package:

\documentclass{article}
\usepackage{makecell}
\usepackage{cellspace}
\usepackage{multirow}
\begin{document}
  \begin{tabular}{Sl Sl}
    a & \makecell{b}\\
    A & $\frac{1}{9}\times20$\\
    A & $\frac{1}{9}\times2000 + b$\\
  \end{tabular}
\end{document}

Now the math formulae are spaced more comfortably, but the centring of a cell with \makecell got disrupted. How to fix this problem? enter image description here

1

You could use \multicolumn instead of \makecell:

\documentclass{article}
\usepackage{makecell}
\usepackage{cellspace}
\begin{document}
  \begin{tabular}{Sl Sl}
    a & \multicolumn{1}{Sc}{b}\\ 
    A & $\frac{1}{9}\times20$\\ 
    A & $\frac{1}{9}\times2000 + b$\\ 
  \end{tabular}
\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.