如何修復 Abbildung 的標題,使其不與數字分開?在第一個中,為什麼文字不正好位於圖 4.4 的下方?
謝謝。
\begin{figure}[htbp]
\centering
\begin{minipage}[b]{0.5\textwidth}
\includegraphics[width=0.7\textwidth, height=0.7\textwidth]{Figures/4.5.jpg}
\captionsetup{width=0.6\linewidth}
\caption[MHZ2-20D pneumatischer Parallelgreifer]{\begin{tabular}{c} MHZ2-20D pneumatischer Parallelgreifer \ \cite{amazon} \end{tabular}}
\end{minipage}\hfill
\begin{minipage}[b]{0.5\textwidth}
\centering
\includegraphics[width=0.7\textwidth, height=0.7\textwidth]{Figures/4.6.jpg}
\captionsetup{width=0.7\linewidth}
\caption[3D gedruckte Greiferbacken]{\begin{tabular}{c} 3D bedruckte Greiferbacken \ \cite{N} \end{tabular}}
\end{minipage}
\end{figure}
答案1
我不完全確定您想要實現什麼,所以請告訴我您對以下內容的看法。標題位於圖像下方居中,圖像在標題的第一行對齊。
\documentclass{article}
\usepackage{graphicx}
\usepackage[format=plain]{subcaption}
\begin{document}
\begin{figure}[htbp]
\centering
\subcaptionbox%
[MHZ2-20D pneumatischer Parallelgreifer]% short caption
{MHZ2-20D pneumatischer Parallelgreifer \cite{amazon}}% long caption
[0.5\linewidth]% width
[c]% position of caption
{\includegraphics[width=\linewidth]{example-image}}% content
\subcaptionbox%
[3D gedruckte Greiferbacken]%
{3D bedruckte Greiferbacken \cite{N}}%
[0.5\linewidth]%
[c]%
{\includegraphics[width=\linewidth]{example-image-duck}}
\end{figure}
\end{document}