【问题标题】:How to give an space between figures on subfigure latex ambient?如何在子图乳胶环境中的数字之间留出空间?
【发布时间】:2018-09-25 15:38:39
【问题描述】:

我正在使用命令 \begin{subfigure}...\end{subfigure} 并排插入三张图片。但我想知道如何在这之间留出空间,因为它们彼此太近了。

\begin{figure}
    \begin{subfigure}
       here's the first image
    \end{subfigure}
    \begin{subfigure}
       here's the second image
    \end{subfigure}
    \begin{subfigure}
       here's the third image
    \end{subfigure}
\end{figure}

【问题讨论】:

  • 我已经投票结束这个问题,建议迁移到TeX - LaTeX

标签: latex subfigure


【解决方案1】:

我建议使用subcaption 并在图片之间添加一些\hspace

\documentclass{article}

\usepackage{subcaption,graphicx}

\begin{document}

\begin{figure}
  \centering
  \begin{subfigure}{.3\linewidth}
    \centering
    \includegraphics[width = \linewidth]{example-image-a}
    \caption{First image}
  \end{subfigure}%
  \hspace{1em}% Space between image A and B
  \begin{subfigure}{.3\linewidth}
    \centering
    \includegraphics[width = \linewidth]{example-image-b}
    \caption{Second image}
  \end{subfigure}%
  \hspace{2em}% Space between image B and C
  \begin{subfigure}{.3\linewidth}
    \centering
    \includegraphics[width = \linewidth]{example-image-c}
    \caption{Third image}
  \end{subfigure}
  \caption{A number of images}
\end{figure}

\end{document}

【讨论】:

  • 谢谢!使用 subcaption 包时出现错误,可能是由于我正在使用的模板
  • @Diego:很有可能。您必须出示您的代码才能解决该问题。
猜你喜欢
  • 1970-01-01
  • 2011-07-06
  • 1970-01-01
  • 1970-01-01
  • 2011-05-14
  • 1970-01-01
  • 2021-07-05
  • 2017-08-11
相关资源
最近更新 更多