1
    \documentclass{article}
\usepackage{subcaption}
\usepackage[demo]{graphicx}
\usepackage{tabularx}

\begin{document}
\begin{table*}[h]
\renewcommand{\arraystretch}{1.2}

\begin{subtable}{0.22\textwidth}
\centering
\begin{tabular}{c}
\includegraphics[width=0.5\textwidth]{A.jpg}
\end{tabular}
\end{subtable}%
\begin{subtable}{0.75\textwidth}
\begin{tabular}{rp{27em}}
\textbf{SRC}: & caption1 \\
\textbf{Prototypa}: & caption2 \\
\textbf{MODEL2}: & caption3 \\
\textbf{MODEL3}: & caption4 \\
\textbf{MODEL4}: & caption5 \\

\end{tabular}
\end{subtable}

 \caption{ Examples how the model behaves.}
 \end{table*}
 \end{document}
  • 2
    Try \includegraphics[width=\textwidth]{A.jpg} – Hafid Boukhoulda Mar 4 at 21:35
  • Subtable resets \textwidth to its width, just like a minipage with \def\@captype{subtable}. – John Kormylo Mar 4 at 22:05
1

I suggest you change

\begin{subtable}{0.22\textwidth}
\centering
\begin{tabular}{c}
\includegraphics[width=0.5\textwidth]{A.jpg}
\end{tabular}
\end{subtable}%

to

\begin{subtable}{0.22\textwidth}
\raggedleft
\includegraphics[width=0.5\textwidth]{A.jpg}
\end{subtable}%

and also change

\begin{tabular}{rp{27em}}

to

\begin{tabular}{@{}rp{27em}}

The @{} particle instructs LaTeX not to insert any whitespace padding at the left-hand edge of the tabular environment.


A full MWE:

enter image description here

\documentclass{article}
\usepackage{subcaption}
\usepackage[demo]{graphicx}
\usepackage{tabularx}

\begin{document}
\begin{table*}[h]
\renewcommand{\arraystretch}{1.2}

\begin{subtable}{0.22\textwidth}
\raggedleft
\includegraphics[width=0.5\textwidth]{A.jpg}
\end{subtable}%
\begin{subtable}{0.75\textwidth}
\begin{tabular}{@{}rp{27em}}
\textbf{SRC}: & caption1 \\
\textbf{Prototypa}: & caption2 \\
\textbf{MODEL2}: & caption3 \\
\textbf{MODEL3}: & caption4 \\
\textbf{MODEL4}: & caption5 \\

\end{tabular}
\end{subtable}

 \caption{ Examples how the model behaves.}
 \end{table*}
 \end{document}

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.