1

I'm trying to a make a table with figures in it. But, the figures won't fit in the cells (see example at the end). I'm also trying to make the text in the cells next to the pictures come in the middle of the rows. And of course I'm trying to have all the table lines be visible (see right side of the table).

Is it easier to not use the multicol package if I want caption and label for my table? Sense, then I can include it in a table environment and use the \twoclolumn command instead.

This is how I have done it so far:

\documentclass[9pt]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage[section]{placeins}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm, a4paper]{geometry}
\usepackage{fancyhdr}
\usepackage[font=small, labelfont=bf, singlelinecheck=false, justification=raggedright, skip=0pt]{caption}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{wrapfig}
\usepackage[colorlinks = true, linkcolor = blue, citecolor = red]{hyperref}
\usepackage{lastpage}
\usepackage[superscript]{cite}

\pagestyle{fancy}

\begin{document}
\begin{multicols}{2}
\begin{tabular*}{\2\columnwidth}{c|c|c|c|c|}
    \cline{2-5}
    & \multicolumn{4}{|c|}{Daughter} \\
    \cline{2-5}
    & \multicolumn{2}{|c|}{$re=0$} & \multicolumn{2}{c|}{$re=0.875$} \\ \hline
\multicolumn{1}{|l|}{$k_{3}=0$} 
& \includegraphics[height=2cm]{daughterC1,0.jpg} & $ \frac{Number of division}{3 time points} $

    & \includegraphics[height=2cm]{daughterC2,0.jpg} & $ \frac{Number of division}{3 time points} $ \\ \hline

    \multicolumn{1}{|l|}{$k_{3}=1.6$} & \includegraphics[height=2cm]{daughterC1,6.jpg} & $ \frac{Number of division}{3 time points} $

    & \includegraphics[height=2cm]{daughterC2,16.jpg} & $ \frac{Number of division}{3 time points} $ \\ \hline

    \multicolumn{1}{|l|}{$k_{3}=2.5$} & \includegraphics[height=2cm]{daughterC1,25.jpg} & $ \frac{Number of division}{3 time points} $

    & \includegraphics[height=2cm]{daughterC2,25.jpg} & $ \frac{Number of division}{3 time points} $ \\ \hline

\end{tabular*}
\end{multicols}
\end{document}

And this is how it looks:

enter image description here

0

Something like following figure? enter image description here

I reproduce one third of your table. Escaped rows can be easily added. For this image I redesign your table in follows:

  • for column type I use m{>width}, which provide package array. It is added in preamble of MWE
  • columns with math are defined as />{$}m{}<{$}. By this I simplify the table code
  • nominator and denominator of fraction s are put in text mode

  • the width of mcolumns I determine experimentaly

The complete MWE is:

\documentclass[9pt]{extarticle}
    \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm, a4paper]{geometry}
    \usepackage[utf8]{inputenc}
    \usepackage[english]{babel}
%    
    \usepackage{amsmath}
%
    \usepackage{graphicx}
    \usepackage[font=small, 
                labelfont=bf, 
                singlelinecheck=false, 
                justification=raggedright, 
                skip=0pt]{caption}
    \usepackage{array}% <-- new
    \usepackage{multicol}
%    \usepackage{showframe}% <-- to see text and page borders
    \begin{document}
\begin{multicols}{2}
\noindent%
\begin{tabular*}{\textwidth}{|>{$}l<{$}|
                             *{2}{m{0.28\textwidth}|>{$}m{0.129\textwidth}<{$}|}}
    \cline{2-5}
\multicolumn{1}{c|}{}    
    & \multicolumn{4}{c|}{Daughter}                                         \\
    \cline{2-5}
\multicolumn{1}{c|}{}
    &   \multicolumn{2}{c|}{$re=0$} 
            &   \multicolumn{2}{c|}{$re=0.875$}                             \\ 
    \hline
k_{3}=0
    &   \smallskip
        \includegraphics[width=\hsize]{example-image}
        &   \frac{\text{Number of division}}{\text{3 time points}}
            &   \smallskip
                \includegraphics[width=\hsize]{example-image}
                &   \frac{\text{Number of division}}{\text{3 time points}}  \\
    \hline
\end{tabular*}
\end{multicols}
    \end{document}

IN it I omit all packages from your MWE, which are not essential for above figure.

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.