我想創建一個類似下面的流程圖:
IMG 1 --------> IMG 2 ------> IMG 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
而不是figure
-environment:
\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}