首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在子图形latex环境中的图形之间留出空格?

如何在子图形latex环境中的图形之间留出空格?
EN

Stack Overflow用户
提问于 2018-09-25 23:38:39
回答 1查看 28K关注 0票数 3

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

代码语言:javascript
复制
\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}
EN

回答 1

Stack Overflow用户

发布于 2018-09-26 03:14:04

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

代码语言:javascript
复制
\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}
票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52501988

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档