我是第一次使用 LaTeX,我正在尝试编写一份包含许多图表的报告。
我使用改编自美国物理学会 REVTeK-4 Pages 格式并包含以下序言:
\documentclass[aps,twocolumn,secnumarabic,nobalancelastpage,amsmath,amssymb,
nofootinbib]{revtex4}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage{graphics} % standard graphics specifications
\usepackage{graphicx} % alternative graphics specifications
\usepackage{longtable} % helps with long table options
\usepackage{url} % for on-line citations
\usepackage{bm} % special 'bold-math' package
\usepackage{braket} %bra-ket notation
\usepackage{color}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor} %font colour
\usepackage{gensymb}
\usepackage{titlesec}
\usepackage[toc,page]{appendix}
\usepackage{stfloats}
\usepackage{float}
\usepackage{hyperref}
\usepackage{natbib}
\usepackage{braket}
\usepackage{enumerate}
\usepackage{amsmath}
使用以下方法放置 3 个图表
\begin{figure}
\begin{center}
\includegraphics[width=6cm]{ma.eps}
\caption{Average magnetisation per spin site versus temperature (black), Onsager's analytical prediction for the spontaneous magnetisation (red), Onsager's prediction for the critical temperature in an isotropic square lattice with $h=0$ (cyan).}\label{mag}
\end{center}
\end{figure}
列中似乎出现了完全空白的部分,无法在其中设置一些文本或图形。我尝试调整图形的大小,但没有效果。
我将添加一部分代码,以提供更具体的示例:
\section{Results and analysis}
Some text.
\begin{figure}
\centering
\includegraphics[width=6cm]{ma.eps}
\caption{Average magnetisation per spin site versus temperature (black), Onsager's analytical prediction for the spontaneous magnetisation (red), Onsager's prediction for the critical temperature in an isotropic square lattice with $h=0$ (cyan).}\label{mag}
\end{figure}
Some more text.
\begin{figure}
\centering
\includegraphics[width=6cm]{ma.eps}
\caption{Average magnetisation per spin site versus temperature (black), Onsager's analytical prediction for the spontaneous magnetisation (red), Onsager's prediction for the critical temperature in an isotropic square lattice with $h=0$ (cyan).}\label{mag}
\end{figure}
下面我附上了编译后的文档的截图。
谢谢你!
答案1
这是更详细的评论...我无法重现您的问题。在测试中,我首先删除所有两次加载的包,然后移动hyperref
到序言的末尾,并将包打包lipsum
为虚拟文本。我得到了以下结果:
测试使用的代码:
\documentclass[aps,twocolumn,secnumarabic,nobalancelastpage,amsmath,amssymb,
nofootinbib]{revtex4}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
%\usepackage{graphics} % <-- why? graphicx is sufficient specifications
%\usepackage{graphicx} % <-- loaded second time
\usepackage{longtable} % helps with long table options
%\usepackage{url} % at package hyperref is surplus
\usepackage{bm} % special 'bold-math' package
\usepackage{braket} %bra-ket notation
%\usepackage{color} <-- at xcolor is surplus
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor} %font colour
\usepackage{gensymb}
\usepackage{titlesec}
\usepackage[toc,page]{appendix}
\usepackage{stfloats}
\usepackage{float}
\usepackage{natbib}
\usepackage{braket}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{figure}[htb]
\centering
\includegraphics[width=6cm]{example-image-a}
\caption{Average magnetisation per spin site versus temperature (black), Onsager's analytical prediction for the spontaneous magnetisation (red), Onsager's prediction for the critical temperature in an isotropic square lattice with $h=0$ (cyan).}
\label{mag}
\end{figure}
\lipsum[2]
\begin{figure}[htb]
\centering
\includegraphics[width=6cm]{example-image-b}
\caption{Average magnetisation per spin site versus temperature (black), Onsager's analytical prediction for the spontaneous magnetisation (red), Onsager's prediction for the critical temperature in an isotropic square lattice with $h=0$ (cyan).}
\label{mag}
\end{figure}
\lipsum[3]
\begin{figure}[htb]
\centering
\includegraphics[width=6cm]{example-image-b}
\caption{Average magnetisation per spin site versus temperature (black), Onsager's analytical prediction for the spontaneous magnetisation (red), Onsager's prediction for the critical temperature in an isotropic square lattice with $h=0$ (cyan).}
\label{mag}
\end{figure}
\lipsum[4]
\end{document}