Abbildung mit einer Bildunterschrift unten und einer Bildunterschrift/Legende an der Seite

Abbildung mit einer Bildunterschrift unten und einer Bildunterschrift/Legende an der Seite

Ich suche nach einer Möglichkeit, seitlich zu meinem Bild eine Legende hinzuzufügen und gleichzeitig meine Bildunterschrift darunter beizubehalten.

Ich habe derzeit folgenden Code:

\begin{figure}
\centering
\includegraphics[height=4cm]{example-image-a}
\caption{
    This is my caption
}
\label{fig:this-is-my-label}
\end{figure}

Daraus ergibt sich folgendes Bild:

Screenshot des Ergebnisses des obigen Codes

Im Grunde suche ich jetzt nach einer Möglichkeit, rechts oder links des Bildes eine Legende hinzuzufügen. Vielen Dank im Voraus!

Antwort1

Mithilfe von zwei nebeneinander angeordneten minipages innerhalb der figureUmgebung können Sie Folgendes erreichen:

Bildbeschreibung hier eingeben

\documentclass{article}

\usepackage{graphicx}
\usepackage[export]{adjustbox}

\begin{document}

\begin{figure}
\begin{minipage}{0.725\textwidth}
\hfill
\includegraphics[height=4cm]{example-image-a}
\end{minipage}
\hfill
\begin{minipage}{0.2\textwidth}
This is my legend. This is my legend.  This is my legend.  This is my legend.  This is my legend. 
\end{minipage}
\caption{This is my caption}
\label{fig:this-is-my-label}
\end{figure}

\begin{figure}
\begin{minipage}{0.2\textwidth}
This is my legend. This is my legend.  This is my legend.  This is my legend.  This is my legend. 
\end{minipage}
\hfill
\begin{minipage}{0.725\textwidth}
\includegraphics[height=4cm]{example-image-a}
\end{minipage}
\caption{This is my caption}
\label{fig:this-is-my-label}
\end{figure}

\begin{figure}
\begin{minipage}[t]{0.725\textwidth}
\hfill
\includegraphics[height=4cm,valign=t]{example-image-a}
\end{minipage}
\hfill
\begin{minipage}[t]{0.2\textwidth}
This is my legend. This is my legend.  This is my legend.  This is my legend.  This is my legend. 
\end{minipage}
\caption{This is my caption}
\label{fig:this-is-my-label}
\end{figure}

\end{document}

Antwort2

Bildbeschreibung hier eingeben

\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{tabularx}

\begin{document}
    \begin{figure}[ht]
\centering
\begin{tabularx}{0.8\linewidth}{XX}
\includegraphics[height=4cm, width=\linewidth, keepaspectratio,
                 valign=c]{example-image-duck} 
    &   Legend: some long explanation of image  \\
\caption{This is my caption in two lines}
\label{fig:this-is-my-label}
    &
    \end{tabularx}
    \end{figure}
or
    \begin{figure}[ht]
\centering
\begin{tabularx}{0.8\linewidth}{XX}
\includegraphics[height=4cm, width=\linewidth, keepaspectratio,
                 valign=c]{example-image-duck}
    &   Legend: some long explanation of image  \\
    \end{tabularx}
\caption{This is my caption in one line}
\label{fig:this-is-my-label}
    \end{figure}
\end{document}

verwandte Informationen