0

I will provide a MWE if you think it is necessary but I believe it is not.


I have created the following (cropped) tabular:

enter image description here

I have used $\vdots$ in order to recall that some data are the same among several instances. I am unsatisfied with the use of this command because I feel there are too many $\vdots$. Usually, in a Matrix, one would use $\vdots$ only once or a couple of times per column. That's why I wanted to know if with a thin vertical continuous line instead of the dots would be better. However, I am struggling to code such multi-row spanning command. Any other suggestion would be welcome :)

3
  • 5
    It will be helpful to provide the table code.
    – Stephen
    Commented Aug 2 at 1:15
  • See nicematrix package.
    – Zarko
    Commented Aug 2 at 5:08
  • 2
    An MWE is necessary.
    – CarLaTeX
    Commented Aug 2 at 5:50

2 Answers 2

2

A golden rule in tables is to never repeat data.

Your table doesn't tell the reader what the values are supposed to mean, but I guess that you repeat some experiment with fixed initial value (the second column) a certain number of times (third column), which are fixed throughout one set of experiments.

\documentclass{article}  % or some other suitable document class
\usepackage[T1]{fontenc}

\usepackage{array}    % for '\newcolumntype' macro
\usepackage{booktabs} % for well-spaced horizontal rules
\usepackage{siunitx}  % for 'S' col. type and '\unit' and '\qty' macros

\begin{document}

\begin{table}[htp]
\centering

\begin{tabular}{@{} >{\ttfamily}l S[table-format=2.2] @{}}
\toprule
\normalfont Instance & {Power (\unit{\mega\watt})}\\
\midrule
\multicolumn{2}{@{}l@{}}{Initial power \qty{10}{\kilo\watt}, $2$ tries} \\
10(8+2)        & .19 \\
25(20+5)       & .47 \\
50(40+10)      & 1.1 \\
100(80+20)     & 2   \\
200(140+60)    & 4.1 \\
500(400+100)   & 10  \\
1000(800+200)  & 20  \\
2000(1600+400) & 41  \\
\midrule
\multicolumn{2}{@{}l@{}}{Initial power $D_b$, $2$ tries} \\
10(8+2)        & .19 \\
25(20+5)       & .47 \\
50(40+10)      & 1.1 \\
100(80+20)     & 2   \\
200(140+60)    & 4.1 \\
500(400+100)   & 10  \\
1000(800+200)  & 20  \\
4000(3200+800) & 81  \\
\bottomrule
\end{tabular}

\caption{A meaningful caption to the table}

\end{table}

\end{document}

output

Fix the terminology.

2
  • +1 for expertly streamlining the table.
    – Mico
    Commented Aug 2 at 10:33
  • 2
    To the unknown downvoter: the answer has been accepted by the OP.
    – egreg
    Commented Aug 2 at 15:08
3
  • If you think $\vdots$ looks too busy, how about a single $\cdot$, accompanied by a table footnote that explains that $\cdot$ means "same value as in the preceding row"? If $\cdot$ is too "skinny looking" for your taste, you could try $\bullet$.

  • To declutter and streamline the "look" of the final column, you could (a) move the common unit (MW) into the header and (b) align the numbers in that column on the (implicit or explicit) decimal marker with the help of the S column type (provided by the siunitx package).

enter image description here

\documentclass{article}  % or some other suitable document class
\usepackage[T1]{fontenc}
\usepackage{array}    % for '\newcolumntype' macro
\usepackage{booktabs} % for well-spaced horizontal rules
\usepackage{siunitx}  % for 'S' col. type and '\unit' and '\qty' macros
\usepackage{threeparttable} % force width of legend to that of 'tabular' env.

\newcolumntype{C}{>{$}c<{$}} % centered, automatic math mode

\begin{document}
\begin{table}[ht]
\centering
\begin{threeparttable}
\begin{tabular}{@{} >{\small\sffamily}l C C S[table-format=2.2] @{}}
\toprule
\multicolumn{1}{@{}l}{Instance} & & & {Power}\\
               &       &       & [{\unit{\mega\watt}}]\\
\midrule
10(8+2)        & \qty{10}{\kilo\watt} & 2 & .19 \\
25(20+5)       & \cdot & \cdot & .47 \\
50(40+10)      & \cdot & \cdot & 1.1 \\
100(80+20)     & \cdot & \cdot & 2   \\
200(140+60)    & \cdot & \cdot & 4.1 \\
500(400+100)   & \cdot & \cdot & 10  \\
1000(800+200)  & \cdot & \cdot & 20  \\
2000(1600+400) & \cdot & \cdot & 41  \\
\addlinespace
10(8+2)        & D_b   & 2     & .19 \\
25(20+5)       & \cdot & \cdot & .47 \\
$\vdots$ \\
4000(3200+800) & \cdot & \cdot & 81  \\
\bottomrule
\end{tabular}
\smallskip\raggedright
\footnotesize The symbol ``\,$\cdot\,$'' in columns 2 and 3 denotes ``same value as in preceding row.''
\end{threeparttable}
\end{table}

\end{document}
1
  • 1
    Thank you, this is exactly what I was searching. cdot is a nice idea!
    – JKHA
    Commented Aug 2 at 8:14

You must log in to answer this question.

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