5

I have designed a table that is looking well except for one part, that is not aligned vertically to the center. I think it has to do with the line separating "Property at 27ºC" from the actual properties bellow it, and this \cline is covering a bit of the text bellow it.

This is the code:

\begin{table}[]
\centering
\begin{tabular}{lcccc}
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Process}} & \multicolumn{4}{c}{Property at 27ºC} \\ \cline{2-5}
\multicolumn{1}{c}{}        & S      & $\sigma$    & k       & zT       \\
\midrule
Unannealed                  & 140    & 1052        & 9.73    & 0.0636   \\
Annealed at 1345ºC          & 155    & 768         & 7.67    & 0.0722   \\
Annealed at 1365ºC          & 151    & 845         & 6.00    & 0.0964   \\
\bottomrule
\end{tabular}
\caption{Influence of annealing at 27ºC}
\label{tab:influenceofannealing}
\end{table}

And this is what it looks like:

Table I have now

Is there a way I can set the text of the four columns a bit lower or set as vertically centered to the confined space? Also set the cell "Property at 27ºC" a bit higher?

Thanks in advance!

4
  • What about \cmidrule instead of \cline? You will however have to adjust the value of the multirow to something like \multirow{2.35}{*}{Process}.
    – leandriis
    Commented Apr 4, 2020 at 10:52
  • The cellspace package resolves spacing issues like yours. Commented Apr 4, 2020 at 10:57
  • You don't have to put an empty \multicolumn{1}{c}{} in the second line of your \multirow, an empty cell is an empty cell, doesn't matter how it is aligned. Also, contrarily to what @leandriis suggests, I'd not try to guess the value correctly, but use the correct offset as a correction.
    – Skillmon
    Commented Apr 4, 2020 at 11:04
  • 2
    Incidentally, it's typographically inappropriate to use the º symbol to denote temperature in degrees.
    – Mico
    Commented Apr 4, 2020 at 11:11

3 Answers 3

4

Turning the comments of @leandris and myself into an answer.

The following uses \cmidrule and adjusts the \multirow accordingly. In addition it typesets the temperatures using the siunitx package (thanks to @Mico for pointing to the degree symbol used)

\documentclass[]{article}

\usepackage{booktabs}
\usepackage{multirow}
\usepackage{siunitx}

\begin{document}
\begin{table}[]
\centering
\begin{tabular}{lcccc}
\toprule
  \multicolumn{1}{c}{\multirow{2}{*}[-\dimexpr0.5\cmidrulewidth+\cmidrulesep]{Process}} & \multicolumn{4}{c}{Property at \SI{27}{\celsius}} \\ \cmidrule{2-5}
                                & S      & $\sigma$    & k       & zT       \\
\midrule
Unannealed                      & 140    & 1052        & 9.73    & 0.0636   \\
Annealed at \SI{1345}{\celsius} & 155    & 768         & 7.67    & 0.0722   \\
Annealed at \SI{1365}{\celsius} & 151    & 845         & 6.00    & 0.0964   \\
\bottomrule
\end{tabular}
\caption{Influence of annealing at \SI{27}{\celsius}}
\label{tab:influenceofannealing}
\end{table}
\end{document}

enter image description here

3

In addition to employing \cmidrule instead of \cline -- a suggestion already employed in @Skillmon's earlier answer -- I would also like to suggest that you employ the S column type (provided by the siunitx package) instead of the c column type for the four data columns. And, rather than using the typographically inappropriate º symbol for degrees (Celsius), do please write \SI{...}{\celsius}. Finally, I= would also like to suggest that you simplify the layout by placing the word "Process" into the top-left cell and make the header over the four data columns less wordy (and less-redundant, given that the information is already given in the caption).

enter image description here

\documentclass{article}
\usepackage{newtxtext,newtxmath} % Times Roman text and math font -- optional
\usepackage{booktabs,siunitx}
\newcolumntype{T}[1]{S[table-format=#1]}
\begin{document}
\begin{table}
\centering
\begin{tabular}{@{} l T{3.0}T{4.0}T{1.2}T{1.4} @{}}
\toprule
Process & \multicolumn{4}{c@{}}{Property} \\ 
\cmidrule(l){2-5}
& {S [\si{\micro\volt\per\kelvin}]}    
& {$\sigma$ [\si{\S\per\centi\meter}]} 
& {k [\si{\watt\per\meter\per\kelvin}]} 
& {zT}
\midrule
Unannealed                      & 140 & 1052 & 9.73 & 0.0636   \\
Annealed at \SI{1345}{\celsius} & 155 &  768 & 7.67 & 0.0722   \\
Annealed at \SI{1365}{\celsius} & 151 &  845 & 6.00 & 0.0964   \\
\bottomrule
\end{tabular}
\caption{Influence of annealing at \SI{27}{\celsius} (\SI{300}{\kelvin})}
\label{tab:influenceofannealing}
\end{table}
\end{document}
2

Here is yet another alternative using the cellspace package:

\documentclass{article}

\usepackage[column=O]{cellspace}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{multirow}

\newlength\TopBottomLimit
\setlength\TopBottomLimit{0.7em}
\setlength\cellspacetoplimit{\TopBottomLimit}
\setlength\cellspacebottomlimit{\TopBottomLimit}

\begin{document}

\begin{table}
    \centering
    \begin{tabular}{O{l}O{c}O{c}O{c}O{c}}
        \toprule
        \multirow{2}{*}[-\TopBottomLimit]{Process} & \multicolumn{4}{O{c}}{Property at \SI{27}{\celsius}} \\ \cline{2-5}
                                        & \si{\celsius}      & $\sigma$    & k       & zT       \\
        \midrule
        Unannealed                      & 140    & 1052        & 9.73    & 0.0636   \\
        Annealed at \SI{1345}{\celsius} & 155    & 768         & 7.67    & 0.0722   \\
        Annealed at \SI{1365}{\celsius} & 151    & 845         & 6.00    & 0.0964   \\
        \bottomrule
    \end{tabular}
    \caption{Influence of annealing at \SI{27}{\celsius}}
    \label{tab:influenceofannealing}
\end{table}

\end{document}

enter image description here

Remark

You place the information that the process takes places at 27°C both in the header of the table and in the caption. I don't think that this redundancy contributes to a better readability of your document. You may think about reducing the degree of redundancy. In this case the issue will solve itself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .