[Tex/LaTex] How to generate a table of figures

subfloatstables

How to generate a table of figures like this example below:
enter image description here

Best Answer

For a table of figures like this one you can use the package booktabs, like this:

\documentclass[a4paper,10pt]{article}

\usepackage{booktabs}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}

\newcommand{\dummyfigure}{\tikz \fill [NavyBlue] (0,0) rectangle node [black] {Figure} (2,2);}

\begin{document}
    \begin{table}
        \centering
        \begin{tabular}{ccccc}
           \toprule
            Nr. & a & b & c & d \\
            \midrule
            1 & \dummyfigure & \dummyfigure & \dummyfigure & \dummyfigure \\
            2 & \dummyfigure & \dummyfigure & \dummyfigure & \dummyfigure \\
            3 & \dummyfigure & \dummyfigure & \dummyfigure & \dummyfigure \\
            \bottomrule
        \end{tabular}
        \caption{Table of figures}
        \label{tbl:table_of_figures}
    \end{table}
\end{document}

But, as you can see in the figure below, the text in the first column will not be vertically aligned.

Table of figures

In order to do this, you need to use the array package and create a new column type:

    \newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}

Then, use this new column type for the columns containing the figures, like this:

\documentclass[a4paper,10pt]{article}

\usepackage{array}
\usepackage{booktabs}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}

\newcommand{\dummyfigure}{\tikz \fill [NavyBlue] (0,0) rectangle node [black] {Figure} (2,2);}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}

\begin{document}
    \begin{table}
        \centering
        \begin{tabular}{cM{20mm}M{20mm}M{20mm}M{20mm}}
           \toprule
            Nr. & a & b & c & d \\
            \midrule
            1 & \dummyfigure & \dummyfigure & \dummyfigure & \dummyfigure \\
            2 & \dummyfigure & \dummyfigure & \dummyfigure & \dummyfigure \\
            3 & \dummyfigure & \dummyfigure & \dummyfigure & \dummyfigure \\
            \bottomrule
        \end{tabular}
        \caption{Table of figures}
        \label{tbl:table_of_figures}
    \end{table}
\end{document}

Table of figures