複数行のテキストを含むグリッド内の図

複数行のテキストを含むグリッド内の図

ここに画像の説明を入力してください

グリッドに挿入図を配置するにはどうすればよいでしょうか。各図には 4 つのキャプションがあります。サブフロートを使用してみましたが、うまくいかないようです。

\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}

\begin{figure}[ht] \label{ fig7} 
  \begin{minipage}[b]{0.5\linewidth}
   \includegraphics[width=0.35\linewidth,valign=c]{1.jpg} 
\caption{The first caption}
\caption{The second caption}
\caption{The third caption}
\caption{The fourth caption}
  \end{minipage} 
  \begin{minipage}[b]{0.5\linewidth}
   \includegraphics[width=0.35\linewidth,valign=c]{2.jpg} 
\caption{The first caption}
\caption{The second caption}
\caption{The third caption}
\caption{The fourth caption}
  \end{minipage} 
  \begin{minipage}[b]{0.5\linewidth}
   \includegraphics[width=0.35\linewidth,valign=c]{2.jpg} 
\caption{The first caption}
\caption{The second caption}
\caption{The third caption}
\caption{The fourth caption}
  \end{minipage}
  \hfill
  \begin{minipage}[b]{0.5\linewidth}
    \includegraphics[width=0.35\linewidth,valign=c]{3.jpg} 
\caption{The first caption}
\caption{The second caption}
\caption{The third caption}
\caption{The fourth caption}
  \end{minipage} 
\end{figure}

\end{document}

答え1

編集: まだ推測中ですが、現在、画像は 2 x 2 画像の配列になっています。

ここに画像の説明を入力してください

\documentclass[twocolumn]{article}
\usepackage[export]{adjustbox}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{subcaption}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}    
    \begin{figure*}
    \setkeys{Gin}{width=\linewidth}
    \captionsetup{font=footnotesize, labelfont=bf, 
                  justification=raggedright,
                  skip=0.5ex, singlelinecheck=false}
    \setlength\tabcolsep{3pt}
\begin{tabularx}{\linewidth}{@{} *{4}{X} @{}}
\includegraphics[valign=T]{example-image-duck}
    &   \caption{The first caption}
        \caption{The second caption}
        \caption{The third caption}
        \caption{The fourth caption}
        &   \includegraphics[valign=T]{example-image-duck}
                &   \caption{The first caption}
                    \caption{The second caption}
                    \caption{The third caption}
                    \caption{The fourth caption}    \\
\includegraphics[valign=T]{example-image-duck}
    &   \caption{The first caption}
        \caption{The second caption}
        \caption{The third caption}
        \caption{The fourth caption}
        &   \includegraphics[valign=T]{example-image-duck}
                &   \caption{The first caption}
                    \caption{The second caption}
                    \caption{The third caption}
                    \caption{The fourth caption}    
\end{tabularx}
    \end{figure*}
\end{document}

答え2

ここに画像の説明を入力してください

上記の出力は、次の MWE に示すようにネストされたテーブルを使用して実現されます。

\documentclass{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[export]{adjustbox}
\usepackage{ragged2e}
\newcolumntype{L}[1]{>{\RaggedRight\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\begin{document}

\begin{tabularx}{\textwidth}{p{2cm}Xp{2cm}X}
\includegraphics[width=\linewidth,valign=t]{example-image} &
\begin{tabular}[t]{lL{3cm}}
Original:&  Two people walking on the beach.\\ 
Model21:&   Zwei Personen gehen am Strand. \\
Model2:&   Zwei Personen gehen am Strand. \\
Model23:&  Zwei Personen gehen am Strand. \\
\end{tabular} &
\includegraphics[width=\linewidth,valign=t]{example-image} &
\begin{tabular}[t]{lL{3cm}}
Original:&  Two people walking on the beach.\\ 
Model21:&   Zwei Personen gehen am Strand. \\
Model2:&   Zwei Personen gehen am Strand. \\
Model23:&  Zwei Personen gehen am Strand. \\
\end{tabular}\\
\\
\includegraphics[width=\linewidth,valign=t]{example-image} &
\begin{tabular}[t]{lL{3cm}}
Original:&  Two people walking on the beach.\\ 
Model21:&   Zwei Personen gehen am Strand. \\
Model2:&   Zwei Personen gehen am Strand. \\
Model23:&  Zwei Personen gehen am Strand. \\
\end{tabular} &
\includegraphics[width=\linewidth,valign=t]{example-image} &
\begin{tabular}[t]{lL{3cm}}
Original:&  Two people walking on the beach.\\ 
Model21:&   Zwei Personen gehen am Strand. \\
Model2:&   Zwei Personen gehen am Strand. \\
Model23:&  Zwei Personen gehen am Strand. \\
\end{tabular}
\end{tabularx}
\end{document}

ここに画像の説明を入力してください

descriptionネストされたテーブルの代わりに環境を使用するバリエーションを次に示します。

\documentclass{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{ragged2e}

\newcolumntype{Z}{>{\RaggedRight\let\newline\\\arraybackslash\hspace{0pt}}X}

\usepackage{enumitem}
\setlist[description]{after=\vspace{-\baselineskip},before=\vspace{-\baselineskip},topsep=0pt,partopsep=0pt}

\begin{document}

\begin{tabularx}{\textwidth}{p{2cm}Zp{2cm}Z}
\includegraphics[width=\linewidth,valign=t]{example-image} &
\begin{description}
\item[Original]  Two people walking on the beach.
\item[Model21]   Zwei Personen gehen am Strand. 
\item[Model2]   Zwei Personen gehen am Strand. 
\item[Model23]  Zwei Personen gehen am Strand. 
\end{description} &
\includegraphics[width=\linewidth,valign=t]{example-image} &
\begin{description}
\item[Original]  Two people walking on the beach.
\item[Model21]   Zwei Personen gehen am Strand. 
\item[Model2]   Zwei Personen gehen am Strand. 
\item[Model23]  Zwei Personen gehen am Strand. 
\end{description}
\end{tabularx}


\end{document}

関連情報