下面是我的代码的一部分,我想减少两张图片之间的空间,也想让它们变大。请给我建议。
\begin{figure}[!htbp]
% \centering
\includegraphics[width=0.475\linewidth]{drww_pre_3.pdf}
\includegraphics[width=0.475\linewidth]{drbb_pre_4.pdf}
\caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
\end{figure}
答案1
通过在行尾添加%
,它将抑制以其他方式引入的空格。注意:如果一行以裸宏结尾,则不会引入额外的空格。
这将允许更大的规范width
,而不会触发换行。
\documentclass{article}
\usepackage{graphicx}
\begin{document}
WITHOUT \%
\begin{figure}[!htbp]
% \centering
\includegraphics[width=0.475\linewidth]{example-image-a}
\includegraphics[width=0.475\linewidth]{example-image-b}
\caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
\end{figure}
WITH \%
\begin{figure}[!htbp]
% \centering
\includegraphics[width=0.5\linewidth]{example-image-a}%
\includegraphics[width=0.5\linewidth]{example-image-b}
\caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
\end{figure}
\end{document}
答案2
要删除图形之间的空格,请%
在 的第一行末尾添加\includegraphics
。为什么这是必要的,请参阅详细说明这里。
为了使您的数字更大,只需将 更改为width
,0.5\linewidth
这是第二个数字“跳”到新行之前的最大值。
\begin{figure}[!htbp]
% \centering
\includegraphics[width=0.5\linewidth]{drww_pre_3.pdf}%
\includegraphics[width=0.5\linewidth]{drbb_pre_4.pdf}
\caption{Distributions of the kinematic variables used in the analysis after preselection. The signal has been scaled by a factor of }
\end{figure}