文本和图像并排

文本和图像并排

在此处输入图片描述 我试图分别插入这些图片和那些侧边标题 { a) bla bla, b) bla bla},但到目前为止还没有成功。有时我的工作中有三到四张图片遵循这种模式。我尝试了一些代码,但看起来并不像这样。我想我是不是错过了一些非常简单的东西?

我正在尝试这个,但没有垂直对齐(图形和相应标题之间)

\begin{figure}[!htb]
    \centering
    \caption{Image Title}
    \begin{tabular}{cc}
     a) bla bla bla & \includegraphics[width=0.25\textwidth]{image1} \\
    b) bla bla bla & \includegraphics[width=0.33\textwidth]{image2}
    \end{tabular}
    \label{Image Label}
\end{figure}

答案1

以下是基于的提议这个答案

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage{caption}
\usepackage{subcaption}
\captionsetup{position=top}
\captionsetup[subfigure]{justification=raggedleft}
% from https://tex.stackexchange.com/a/225804/121799
\def\LW{\dimexpr.25\linewidth}
\def\RW{\dimexpr.75\linewidth-.5em}
\newcommand{\picA}{\begin{tikzpicture}[font=\sffamily]
\draw[thick] (0,-0.2) -- (6,-0.2);
\foreach \X[count=\Z,evaluate=\Z as \Y using int(\Z+3)] in {0,3,6}
{
 \draw[thick,-latex] (\X,0.2) -- ++(0,0.8) node[above]{d$_\Y$};
 \draw[thick,-latex] ({\X+0.5},0) arc(0:180:0.5) node[left]{d$_\Z$};
 \fill (\X,-0.2) circle (1pt);
 \fill[pattern=north east lines,thick] ({\X-0.7},-0.7) rectangle
 ({\X+0.7},-1.2);
 \draw[thick] ({\X-0.7},-0.7) -- ({\X+0.7},-0.7) node[above,anchor=south east] {\Z};
 \draw[thick] ({\X-0.3},-0.7) -- (\X,-0.2) -- ({\X+0.3},-0.7);
 \path (current bounding box.south) -- ++(0,-0.1);
}
\end{tikzpicture}
}
\newcommand{\picB}{\begin{tikzpicture}[font=\sffamily]
\draw[thick] (0,-0.2) -- (6,-0.2);
\foreach \X[count=\Z,evaluate=\Z as \Y using int(\Z+3)] in {0,3,6}
{
 \draw[thick,-latex] (\X,-2) node[above right]{f$_\Y$} -- ++(0,0.8);
 \draw[thick,-latex] ({\X+0.5},0) arc(0:180:0.5) node[left]{f$_\Z$};
 \fill (\X,-0.2) circle (1pt);
 \fill[pattern=north east lines,thick] ({\X-0.7},-0.7) rectangle
 ({\X+0.7},-1.2);
 \draw[thick] ({\X-0.7},-0.7) -- ({\X+0.7},-0.7) node[above,anchor=south east] {\Z};
 \draw[thick] ({\X-0.3},-0.7) -- (\X,-0.2) -- ({\X+0.3},-0.7);
 \path (current bounding box.south) -- ++(0,-0.1);
}
\end{tikzpicture}
}
\begin{document}
\begin{figure}
\begin{tabular}{ll}
\parbox[b]{\LW}{\subcaption{This is the A example image}}
\parbox{\RW}{\picA}%
\\%
\parbox[b]{\LW}{\subcaption{The B example image.}}\hfill
\parbox{\RW}{\picB}%
\\%
\parbox[b]{\LW}{\subcaption{This is the A example image}}
\parbox{\RW}{\picA}%
\\%
\parbox[b]{\LW}{\subcaption{The B example image.}}\hfill
\parbox{\RW}{\picB}%
\\%
\parbox[b]{\LW}{\subcaption{This is the A example image}}
\parbox{\RW}{\picA}%
\\%
\parbox[b]{\LW}{\subcaption{The B example image.}}\hfill
\parbox{\RW}{\picB}%
\end{tabular}
\caption{Some subfigures with captions on the left.}
\end{figure}
\end{document}

在此处输入图片描述

相关内容