AnswerBun.com

Subfigure and subtable side-by-side?

TeX - LaTeX Asked by Mas A on July 28, 2020

enter image description here

I have to do something like above.I saw similar questions, but I didn’t find anything about what I need to do exactly.

Here an example of what i did (it doesn’t work as i want):

begin{figure*}[!h]
centering
  begin{subfigure}[t]{0.48textwidth}
  includegraphics[width=1.0linewidth]{figure.png} 
  caption{Caption 1}
  label{fig:fig1}
  end{subfigure}
    
  begin{subtable}[t]{}
  scalebox{0.5}{
    begin{tabular}{|c|c|}
    1 & 2\ hline
    11 & 22\ hline
    end{tabular}
  }
  caption{Caption 2}
  label{table:table}
  end{subtable}
caption{Caption 3}
label{fig:mainfigure}
end{figure*}

One Answer

documentclass[twocolumn]{article}
usepackage[demo]{graphicx} % do not use demo option in actual document.
usepackage{subcaption}

begin{document}

begin{figure*}[!h]
centering
  begin{subfigure}[b]{0.48textwidth}
  includegraphics[width=1.0linewidth]{figure.png} 
  caption{Caption 1}
  label{fig:fig1}
  end{subfigure}
%
  begin{subtable}[b]{0.48textwidth}
  centering
    begin{tabular}{|c|c|}
    1 & 2\ hline
    11 & 22\ hline
    end{tabular}
  caption{Caption 2}
  label{table:table}
  end{subtable}
caption{Caption 3}
label{fig:mainfigure}
end{figure*}

end{document}

enter image description here

Correct answer by leandriis on July 28, 2020

Add your own answers!

Related Questions

Latex listofsymbols newsym with Theta error

2  Asked on July 22, 2021 by klausderriese

 

Figure caption not centered, but only for this figure

1  Asked on July 22, 2021 by lars-nielsen

 

New keyboard shortcut in TeXStudio

1  Asked on July 22, 2021 by vbp

     

Citation with bib latex

0  Asked on July 22, 2021 by paper123

 

How can I highlight elements in a matrix?

3  Asked on July 22, 2021 by bungbu

   

l3draw diagram interpretation

0  Asked on July 22, 2021

 

LyX: Missing menu entry for export to docx

1  Asked on July 21, 2021 by kale-kundert

     

How to add indentation

6  Asked on July 21, 2021

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP