我想创建一个类似下面的流程图:
图片 1 --------> 图片 2 ------> 图片 3 ....
标题 1 ... 标题 2 ... 标题 3.....
我曾尝试过带图像的水平流程图,但我不太清楚如何获取字幕。
答案1
我猜你正在寻找这样的东西:
(红线表示文本边框)
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{tabularx}
\usepackage[export]{adjustbox}
\usepackage[font=footnotesize,labelfont=bf]{caption}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
\begin{document}
\begin{figure}[ht]
\centering
\tikzset{ar/.style = {very thick, gray, -{Triangle[angle=90:3pt 2]}}}
\setkeys{Gin}{width=\linewidth}
\captionsetup{skip=0pt}
\begin{tabularx}{\linewidth}{@{} XcXcX @{}}
\includegraphics[valign=c]{example-image-duck}
& \tikz\draw[ar] (0,0) -- + (0.6,0);
& \includegraphics[valign=c]{example-image-duck}
& \tikz\draw[ar] (0,0) -- + (0.6,0);
& \includegraphics[valign=c]{example-image-duck} \\
\caption{First figure}
& & \caption{Second figure}
& & \caption{Third figure}
\end{tabularx}
\end{figure}
\end{document}
附录:
如果您希望图像处于横向,则必须添加rotating
包并使用sidewaysfigure
-environment figure
:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{tabularx}
\usepackage[export]{adjustbox}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\usepackage{rotating} % <--- new
\begin{document}
\begin{sidewaysfigure}[h] % <--- changed
... < table body
\end{sidewaysfigure}
\end{document}