繁体   English   中英

Latex subfloat 的“subcaption”是一行一个字,如何在一行中将它们组合在一起

[英]Latex subfloat the "subcaption" is one word in one line, how to make them together in only one line

我的结果如图所示,subfloat 的标题不正常,我希望它们在一行中。

\begin{figure}[h]
    \subfloat[Text GCN 1 layer]{
        \label{t-SNE-a}
        \includegraphics[width=0.5\textwidth]{tsne文档嵌入展示a.pdf}
    }
    \subfloat[HAN]{
        \includegraphics[width=0.5\textwidth]{tsne文档嵌入展示b.pdf}
        \label{t-SNE-b}
    }
    \\
    \subfloat[“Text GCN 第二层”]{
        \includegraphics[width=0.5\textwidth]{tsne文档嵌入展示c.pdf}
        \label{t-SNE-c}
    }
    \caption{t-SNE文档嵌入可视化}
    \label{t-SNE文档嵌入可视化}
\end{figure}

我建议你使用subfigure包装的环境subcaption 此环境将子图的宽度作为参数。

\documentclass{article}
\usepackage[draft]{graphicx}
\usepackage{subcaption}

\begin{document}
\begin{figure}[h]
   \centering
   \begin{subfigure}{0.4\linewidth}
      \label{t-SNE-a}
      \includegraphics[width=\linewidth]{tsne文档嵌入展示a.pdf}
      \caption{First very very long caption!}
   \end{subfigure}
   \begin{subfigure}{0.4\linewidth}
      \label{t-SNE-b}
      \includegraphics[width=\linewidth]{tsne文档嵌入展示b.pdf}
      \caption{Second very very long caption!}
   \end{subfigure}
   \begin{subfigure}{0.4\linewidth}
      \label{t-SNE-c}
      \includegraphics[width=\linewidth]{tsne文档嵌入展示c.pdf}
      \caption{A third caption, just a bit longer than the others.}
   \end{subfigure}
   \caption{General caption}
   \label{t-SNE文档嵌入可视化}
\end{figure}
\end{document}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM