1

I have a table which I did for my MSc thesis, that worked just fine: correct table

However, now I want to use that table for an article. I have copied the code, but the bullet points from the 2nd column are too close (vertically): Table where bullets are too close

Any idea how I can fix this? I have tried some things suggested at StackExchange, but none of them worked. This is the code for a test document (where the problem does NOT stand):

\documentclass[pdftex,10pt,a4paper]{article}

%Import packages
\usepackage{subfig}
\makeatletter
\newcommand*{\textoverline}[1]{$\overline{\hbox{#1}}\m@th$}
\makeatother
%
\usepackage{ragged2e}
%
\usepackage{color}
\newcommand{\note}[1]{\textcolor{blue}{{#1}}}
\usepackage{colortbl}
\usepackage{booktabs,eqparbox,tabularx}
\usepackage{enumitem}


\begin{document}

\begin{table}[h]
    \caption{Implemented methods, and corresponding computed metrics.}
    \label{table:computed_metrics}
    \small
    \renewcommand{\arraystretch}{2}
    \setlist[itemize]{nosep,
        leftmargin=*,
        before=\vspace{-0.6\baselineskip},
        after=\vspace{-\baselineskip}
    }
    \begin{tabular}{ >{\RaggedLeft}p{3.6cm} p{4.2cm} p{5.8cm}}
        \hline
        \textbf{Method name}            & \textbf{Metrics}                       & \textbf{Method explanation}                                                                                                                                                                               \\ \hline
        \textbf{Simple statistical metrics} & \begin{itemize}
            \item Mean
            \item Standard deviation (SD)
        \end{itemize}                                   & Computes the mean value and the amount of variation (SD) of a feature's time-series.                                                                                                        \\
        \textbf{Linear variability}              & \begin{itemize}
            \item  Slope of regression ($\alpha$)
            \item Median variability ($m$)
        \end{itemize}                                                 & Calculates the variability of a feature's time-series, and studies how that variability progresses with time (increases [$\alpha>0$], decreases [$\alpha<0$] or maintains [$\alpha=0$]). \\
        \textbf{Non-linear variability}          & \begin{itemize}
            \item Central tendency measurement (CTM)
        \end{itemize}     & Computes the feature's time-series variability using difference plots. The higher the CTM, the lower the variability, and vice-versa.                                                                                                  \\
        \textbf{P-wave amplitude dispersion}          & \begin{itemize}
            \item Amplitude dispersion index (ADI)
        \end{itemize}     & Quantitative indicator of P-wave morphology variability. The greater the ADI, the greater the variability, and vice-versa. Uses the P-waves' signal.                                                                                        \\
        \textbf{Heart rate variability}          & \begin{itemize}
            \item \textoverline{RR}, SDRR, SDSD, RMSSD, NN20, pNN20, NN50, pNN50 
            \item TP, VLF, LF, HF, pHF, pLF, LF/HF
        \end{itemize}
        & Studies the variability of the RR series using metrics from time- and frequency- domain. Gives indications on the autonomic nervous system.                                            \\ \hline
    \end{tabular}
\end{table}



\end{document}

I can't provide a full compilable code, given that I'm using a template from the Sensors Journal (https://www.mdpi.com/authors/latex). However, you can download my full compilable code here: https://ufile.io/n7pg8

Many thanks! Diogo

  • Welcome to TeX.SX. When you post a question, please provide a "Minimal Working Example" (MWE) that starts with \documentclass, includes all relevant \usepackage commands, ends with \end{document} and compiles without errors, even if it does not produce your desired output. – Sandy G Mar 15 at 14:12
  • you should provide a MWE, a small complete document, which reproduce your problem. Link can become after while dead and will be not possible to know, what is actually your problem. – Zarko Mar 15 at 14:15
  • Hello all. As I mentioned, I cannot provide a full compilable code, given that the template contains files other than the main code. I have tried to reproduce the problem in another clean document, but the table got different. Nonetheless I will provide that document, but I warn that the output is different. – Diogo Tec Mar 15 at 14:33
  • i copy your table code in my test environment and i can't reproduce your problem. for MWE: to your code fragment you only need to add `\documenclas{...}˙and necessary part of preamble, which will enable to test your code as it is. – Zarko Mar 15 at 14:38
  • 1
    @DiogoTec mdpi.cls consists of more than 1170 lines of code. Please turn to the helpdesk of mdpi.com, they even offer an emailaddress. – Keks Dose Mar 15 at 16:05
3

Try the following:

\documentclass[journal,article,submit,moreauthors,pdftex,10pt,a4paper]{Definitions/mdpi}
\newcommand*{\textoverline}[1]{$\overline{\hbox{#1}}$} % simplified
%
\usepackage{ragged2e}
\usepackage{booktabs, makecell, tabularx}
\newcolumntype{L}{>{\RaggedRight}X}
\renewcommand\theadfont{\bfseries\normalsize}
\usepackage{enumitem}

\begin{document}
    \begin{table}[h]
\caption{Implemented methods, and corresponding computed metrics.}
\label{table:computed_metrics}
\small
\setlist[itemize]{ % nosep,         % <--- remove "nosep"
                    leftmargin=*,
                    before=\vspace{-0.6\baselineskip},
                    after=\vspace{-\baselineskip}
                }
\setcellgapes{3pt}
\makegapedcells
\begin{tabularx}{\linewidth}{>{\hsize=0.6\hsize\bfseries}L L
                             >{\hsize=1.4\hsize}L
                             }
    \toprule
Method name &   \thead{Metrics}    &   \thead{Method explanation}         \\
    \midrule
Simple statistical metrics
    &   \begin{itemize}
    \item Mean
    \item Standard deviation (SD)
        \end{itemize}
        &  Computes the mean value and the amount of variation (SD) of a feature's time-series.
        \\
Linear variability
    &   \begin{itemize}
    \item  Slope of regression ($\alpha$)
    \item Median variability ($m$)
        \end{itemize}
        & Calculates the variability of a feature's time-series, and studies how that variability progresses with time (increases [$\alpha>0$], decreases [$\alpha<0$] or maintains [$\alpha=0$]).
        \\
Non-linear variability
    &   \begin{itemize}
    \item Central tendency measurement (CTM)
        \end{itemize}
        & Computes the feature's time-series variability using difference plots. The higher the CTM, the lower the variability, and vice-versa.
        \\
P-wave amplitude dispersion
    &   \begin{itemize}
    \item Amplitude dispersion index (ADI)
        \end{itemize}
        & Quantitative indicator of P-wave morphology variability. The greater the ADI, the greater the variability, and vice-versa. Uses the P-waves' signal.
        \\
Heart rate variability
    &   \begin{itemize}
    \item \textoverline{RR}, SDRR, SDSD, RMSSD, NN20, pNN20, NN50, pNN50
    \item TP, VLF, LF, HF, pHF, pLF, LF/HF
        \end{itemize}
        & Studies the variability of the RR series using metrics from time- and frequency- domain. Gives indications on the autonomic nervous system.                                            \\
    \bottomrule
\end{tabularx}
    \end{table}
\end{document}

result tested on overleaf gives the following result:

enter image description here

In MWE above i made some off-topic changes which (according to my taste) made table more nice (use of tabularx for table environment, makecell for more vertical space above and below cell contents).

Addendum: Apparently document class mdpi has hard coded itemize list, which can be overwritten with use of the enumitem package. Also it seems, when itemize is used in table, the \parsep and \itemsep are reduced.

One way for increasing of the vertical space between items is adding \\[1.5ex] after end of each item. Using this solution, you not need enumetem package anymore. So the lists in table you can write as in MWE above, or you can define new column type as is done in MWE below:

\documentclass[journal,article,submit,moreauthors,pdftex,10pt,a4paper]{Definitions/mdpi}
\newcommand*{\textoverline}[1]{$\overline{\hbox{#1}}$} % simplified
%
\usepackage{ragged2e}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\bfseries\normalsize}
\renewcommand\theadgape{}
\newcolumntype{L}{>{\RaggedRight}X}
\makeatletter
\newcolumntype{I}{>{\minipage[t]{\linewidth}%
    \setlength{\leftmargini}{1em}
    \itemize%
           }L<{\@finalstrut\@arstrutbox\enditemize\endminipage}%
                }
\makeatother

\begin{document}
\begin{itemize}
    \item Mean
    \item Standard deviation (SD)
\end{itemize}
    \begin{table}[h]
\caption{Implemented methods, and corresponding computed metrics.}
\label{table:computed_metrics}
\small
\setcellgapes{3pt}
\makegapedcells
\begin{tabularx}{\linewidth}{>{\hsize=0.7\hsize\bfseries}L
                             I%{\textbullet}
                             >{\hsize=1.3\hsize}L
                             }
    \toprule
Method name 
    &   \multicolumn{1}{c}{\thead{Metrics}}    
                &   \thead{Method explanation}         
        \\
    \midrule
Simple statistical metrics
    &   \item Mean\\[1.5ex]
        \item Standard deviation (SD)
        &  Computes the mean value and the amount of variation (SD) of a feature's time-series.
        \\
Linear variability
    &   \item  Slope of regression ($\alpha$)\\[.51ex]
        \item Median variability ($m$)
        & Calculates the variability of a feature's time-series, and studies how that variability progresses with time (increases [$\alpha>0$], decreases [$\alpha<0$] or maintains [$\alpha=0$]).
        \\
Non-linear variability
    &   \item Central tendency measurement (CTM)
        & Computes the feature's time-series variability using difference plots. The higher the CTM, the lower the variability, and vice-versa.
        \\
P-wave amplitude dispersion
    &   \item Amplitude dispersion index (ADI)
        & Quantitative indicator of P-wave morphology variability. The greater the ADI, the greater the variability, and vice-versa. Uses the P-waves' signal.
        \\
Heart rate variability
    &   \item \textoverline{RR}, SDRR, SDSD, RMSSD, NN20, pNN20, NN50, pNN50\\[1.5ex]
        \item TP, VLF, LF, HF, pHF, pLF, LF/HF
        & Studies the variability of the RR series using metrics from time- and frequency- domain. Gives indications on the autonomic nervous system.                                            \\
    \bottomrule
\end{tabularx}
    \end{table}
\end{document}

which gives:

enter image description here

  • The first item in the list seems to start lower than the first line of the text in the first and third column. Maybe you could use before=\vspace{-1\baselineskip}. (I have not tested this since I did not have access to the documentclass used in the question.) – leandriis Mar 15 at 16:31
  • Hello! Many thanks for your help :) I did work! Is there any way to increase the spacing between the two bullets? That'd be great! – Diogo Tec Mar 15 at 16:36
  • @DiogoTec: You could add the itemsep=<length> option (with a <length> of your choice) to the ` \setlist[itemize]` command. – leandriis Mar 15 at 17:36
  • @leandriis many thanks. Unfortunately, it doesn't work. I've tried several lenghts (1cm to 20cm) and they produce no changes – Diogo Tec Mar 15 at 17:49
  • @DiogoTec: I can not reproduce this. If I use the MWE ftrom Zarko's answer and add itemsep=1cm to \setlist[itemize] I obtain the following result: i.stack.imgur.com/5giML.png – leandriis Mar 15 at 18:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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