如何解决乳胶数字;绘制四部分图时,一个 (b) 比另一个浮得更高,我找不到任何原因
我正在用乳胶写一篇文章,出于某种原因,我的一个人物神秘地四处飘荡。 我试图制作一个四的数字(a,b,c,d),而 b 数字只是漂浮在它应该在的位置之上。 我在定义图形后检查了图形大小和任何额外的标志,但似乎找不到问题。
有人看到有什么问题吗?
\documentclass[11pt]{article}
\usepackage[left=25mm,right=25mm,top=25mm,bottom=25mm,includehead=true,includefoot=true]{geometry}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[table,xcdraw]{xcolor}
\usepackage{hyperref}
\usepackage{mathtools}
%\usepackage[caption=false]{subfig}
\usepackage{amsmath}
\usepackage{multirow}
\graphicspath{ {./images/} }
\usepackage{url}
\usepackage{caption}
\usepackage[round]{natbib} % For referencing
\usepackage{authblk} % For author lists
\usepackage[parfill]{parskip} % Line between paragraphs
\usepackage[normalem]{ulem}
\usepackage{multicol}
\pagenumbering{gobble} % Turn off page numbers
% Make all headings the same size (11pt):
\usepackage{sectsty}
\sectionfont{\normalsize}
\subsectionfont{\normalsize}
\subsubsectionfont{\normalsize}
\paragraphfont{\normalsize}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}[a]{0.45\linewidth}
\includegraphics[width=\linewidth]{6_5_model_building_90_0}
\caption{}
\label{fig:3a}
\end{subfigure}\hfill
\begin{subfigure}[b]{0.45\linewidth}
\includegraphics[width=\linewidth]{6_5_model_building_87_0}
\caption{}
\label{fig:3b}
\end{subfigure}
%add desired spacing between images,e. g. ~,\quad,\qquad,\hfill etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}[c]{0.5\linewidth}
\includegraphics[width=\linewidth]{14_5_fisrt_paper_figures_46_1}
\caption{}
\label{fig:3c}
\end{subfigure}\hfill
\begin{subfigure}[d]{0.5\linewidth}
\includegraphics[width=\linewidth]{14_5_fisrt_paper_figures_45_0}
\caption{}
\label{fig:3d}
\end{subfigure}
\caption{My caption}
\label{fig:3}
\end{figure}
\vfill
\clearpage
\newpage
\bibliographystyle{plainnat}
\bibliography{MyLibrary}
\end{multicols}
\end{document}
解决方法
subfigure
环境的第一个可选参数用于外部位置。碰巧 b
和 c
实际上是允许的值,其他的将默认为 c
。您的第二张图片未对齐,因为您指示它底部对齐。
其他一些评论:
-
mathtools
已加载amsmath
-
在其他包之后加载
hyperref
-
如果您还加载了
url
,则不需要hyperref
-
subcaption
已加载caption
\documentclass{article}
\usepackage[left=25mm,right=25mm,top=25mm,bottom=25mm,includehead=true,includefoot=true]{geometry}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[table,xcdraw]{xcolor}
\usepackage{mathtools}
%\usepackage[caption=false]{subfig}
%\usepackage{amsmath}
\usepackage{multirow}
\graphicspath{ {./images/} }
%\usepackage{url}
%\usepackage{caption}
\usepackage[round]{natbib} % For referencing
\usepackage{authblk} % For author lists
\usepackage[parfill]{parskip} % Line between paragraphs
\usepackage[normalem]{ulem}
\usepackage{multicol}
\pagenumbering{gobble} % Turn off page numbers
% Make all headings the same size (11pt):
\usepackage{sectsty}
\sectionfont{\normalsize}
\subsectionfont{\normalsize}
\subsubsectionfont{\normalsize}
\paragraphfont{\normalsize}
\usepackage{hyperref}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}[c]{0.45\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{}
\label{fig:3a}
\end{subfigure}\hfill
\begin{subfigure}[c]{0.45\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{}
\label{fig:3b}
\end{subfigure}
%add desired spacing between images,e. g. ~,\quad,\qquad,\hfill etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}[c]{0.5\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{}
\label{fig:3c}
\end{subfigure}\hfill
\begin{subfigure}[c]{0.5\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{}
\label{fig:3d}
\end{subfigure}
\caption{My caption}
\label{fig:3}
\end{figure}
\vfill
\clearpage
\newpage
\bibliographystyle{plainnat}
\bibliography{MyLibrary}
%\end{multicols}
\end{document}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。