stone-zeng / fduthesis

LaTeX thesis template for Fudan University
LaTeX Project Public License v1.3c
834 stars 208 forks source link

figure中插入subfigure的问题 #207

Closed macheng6 closed 3 years ago

macheng6 commented 3 years ago

比如一个figure中有三个subfigure,我想让这个三个subfigure排列在同一行,分别有自己的编号和描述。编译之后子编号与描述没有和子图对齐。

环境是overleaf,模版是overleaf中的模版。

sikouhjw commented 3 years ago

用这个 https://www.ctan.org/pkg/subcaption 自己读手册

stone-zeng commented 3 years ago
\begin{figure}[htbp]
  \centering
  \begin{subfigure}{0.25\textwidth}
    \centering
    \includegraphics[width=\textwidth]{example-image-a.pdf}
    \caption{示例图片 A}
  \end{subfigure}
  \qquad
  \begin{subfigure}{0.25\textwidth}
    \centering
    \includegraphics[width=\textwidth]{example-image-b.pdf}
    \caption{示例图片 B}
  \end{subfigure}
  \qquad
  \begin{subfigure}{0.25\textwidth}
    \centering
    \includegraphics[width=\textwidth]{example-image-c.pdf}
    \caption{示例图片 C}
  \end{subfigure}
  \caption{来自 \texttt{mwe} 宏包的示例图片}
\end{figure}

Screen Shot 2021-06-05 at 17 18 38

会有一些 warning,但并不影响结果。

macheng6 commented 3 years ago

好的,谢谢

---原始邮件--- 发件人: "Xiangdong @.> 发送时间: 2021年6月5日(周六) 下午5:19 收件人: @.>; 抄送: @.**@.>; 主题: Re: [stone-zeng/fduthesis] figure中插入subfigure的问题 (#207)

\begin{figure}[htbp] \centering \begin{subfigure}{0.25\textwidth} \centering \includegraphics[width=\textwidth]{example-image-a.pdf} \caption{示例图片 A} \end{subfigure} \qquad \begin{subfigure}{0.25\textwidth} \centering \includegraphics[width=\textwidth]{example-image-b.pdf} \caption{示例图片 B} \end{subfigure} \qquad \begin{subfigure}{0.25\textwidth} \centering \includegraphics[width=\textwidth]{example-image-c.pdf} \caption{示例图片 C} \end{subfigure} \caption{来自 \texttt{mwe} 宏包的示例图片} \end{figure}

会有一些 warning,但并不影响结果。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.