我正在使用 aps 期刊提交稿件revtex4-2
,突然出现此错误。不幸的是,我不知道哪个部分是主要原因,因此我附上了我的序言和日志文件。我非常感谢任何帮助提前致谢
\documentclass[aps,prapplied,twocolumn,floatfix,footinbib,notitlepage,superscriptaddress,groupaddress,showpacs,showkeys]{revtex4-2}%,caption
\usepackage{graphicx,times,bm,bbm,bbold,amssymb,amsmath,amsfonts,dsfont,hyperref,mathrsfs,color,cancel}
\pdfminorversion=7
\usepackage{adjustbox}%,makecell
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage[caption=false, justification=centerlast]{subfig}
\usepackage{dcolumn}
\usepackage{booktabs}
\usepackage{nicefrac}
\usepackage{etoolbox}
\usepackage{siunitx}
\apptocmd{\thebibliography}{\raggedright}{}{}
\usepackage{ragged2e}
\usepackage{multirow}
\usepackage{textcomp,gensymb}
\usepackage[mathlines]{lineno}
\newcommand{\acot}{\cot^{-1}}
\begin{document}
\preprint{AIP/123-QED}
\title[Sample title]{a new method}
\author{}
\affiliation{}
\begin{abstract}
\end{abstract}
\keywords{}
\maketitle
\section{Introduction}\label{sec:introduction}
kjh h ih ajkdh akshdj xnhsdjxn iosp;'., bgsajskl
\providecommand{\noopsort}[1]{}\providecommand{\singleletter}[1]{#1}%
\end{document}
和日志文件
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.8.28) (preloaded format=pdflatex 2022.10.13) 13 OCT 2022 18:32
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./aipsamp.tex
(aipsamp.tex
LaTeX2e <2022-06-01> patch level 5
L3 programming layer <2022-09-28>
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/revtex\revtex4-2.cls
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 C
lass revtex4-2 Warning: No type size specified, using default 10.
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Missing character: There is no C in font nullfont!
Missing character: There is no l in font nullfont!
…..
Overfull \hbox (20.0pt too wide) in paragraph at lines 1--2
[]
[]
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.3 (
C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/revtex\aps10pt4...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Missing character: There is no ( in font nullfont!
Missing character: There is no C in font nullfont!
Missing character: There is no : in font nullfont!
! Undefined control sequence.
l.3 (C:\Users
\Sara\AppData\Local\Programs\MiKTeX\tex/latex/revtex\aps10pt4...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.3 (C:\Users\Sara
Missing character: There is no / in font nullfont!
Missing character: There is no l in font nullfont!
! Undefined control sequence.
l.3 ...\Local\Programs\MiKTeX\tex/latex/revtex\aps
10pt4-2.rtx
Missing character: There is no 1 in font nullfont!
!
! Undefined control sequence.
l.7 ) (C:\Users
\Sara\AppData\Local\Programs\MiKTeX\tex/latex/textcase\text...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.7 ) (C:\Users\Sara
\AppData\Local\Programs\MiKTeX\tex/latex/textcase\text...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.7 ) (C:\Users\Sara\AppData
\Local\Programs\MiKTeX\tex/latex/textcase\text...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
Missing character: There is no : in font nullfont!
! Undefined control sequence.
l.11 ) (C:\Users
\Sara\AppData\Local\Programs\MiKTeX\tex/latex/url\url.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.11 ) (C:\Users\Sara
\AppData\Local\Programs\MiKTeX\tex/latex/url\url.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.11 ) (C:\Users\Sara\AppData
\Local\Programs\MiKTeX\tex/latex/url\url.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.11 ) (C:\Users\Sara\AppData\Local
\Programs\MiKTeX\tex/latex/url\url.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.11 ) (C:\Users\Sara\AppData\Local\Programs
\MiKTeX\tex/latex/url\url.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.11 ...Users\Sara\AppData\Local\Programs\MiKTeX
\tex/latex/url\url.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no y in font nullfont!
! Undefined control sequence.
l.12 \Urlmuskip
=\muskip16
Missing character: There is no = in font nullfont!
! Missing number, treated as zero.
<to be read again>
P
l.13 P
ackage: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
The unit of measurement in math glue must be mu.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)
Missing character: There is no C in font nullfont!
Missing character: There is no : in font nullfont!
! Undefined control sequence.
l.15 (C:\Users
\Sara\AppData\Local\Programs\MiKTeX\tex/latex/natbib\natbib.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.15 (C:\Users\Sara
\AppData\Local\Programs\MiKTeX\tex/latex/natbib\natbib.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no b in font nullfont!
! Undefined control sequence.
l.15 ...al\Programs\MiKTeX\tex/latex/natbib\natbib
.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no . in font nullfont!
!
Missing character: There is no ) in font nullfont!
! Undefined control sequence.
l.17 \bibhang
=\skip49
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no = in font nullfont!
! Undefined control sequence.
l.18 \bibsep
=\skip50
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no L in font nullfont!
\citation{o}
! Undefined control sequence.
<write> ...: Citation `\@citeb ' on page \thepage
\space undefined\on@line .
l.19 LaTeX Info: Redefining \cite o
n input line 694.
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
LaTeX Warning: Citation `o' on page undefined on input line 19.
Missing character: There is no ] in font nullfont!
! Undefined control sequence.
l.20 \c@NAT@ctr
=\count266
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no = in font nullfont!
! Missing number, treated as zero.
<to be read again>
)
l.21 )
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
Missing character: There is no ) in font nullfont!
!
Missing character: There is no s in font nullfont!
! Undefined control sequence.
l.22 ...x4-2 Info: Repairing natbib's \BibitemShut
on input line 7665.
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no o in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no i in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no p in font nullfont!
Missing character: There is no u in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no i in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no 7 in font nullfont!
Missing character: There is no 6 in font nullfont!
Missing character: There is no 6 in font nullfont!
Missing character: There is no 5 in font nullfont!
Missing character: There is no . in font nullfont!
Overfull \hbox (20.0pt too wide) in paragraph at lines 3--23
[]
[]
Overfull \hbox (5.43053pt too wide) in paragraph at lines 3--23
[]
[]
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.24 (
C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/revtex\revsymb...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Missing character: There is no ( in font nullfont!
Missing character: There is no C in font nullfont!
Missing character: There is no : in font nullfont!
! Undefined control sequence.
l.24 (C:\Users
\Sara\AppData\Local\Programs\MiKTeX\tex/latex/revtex\revsymb...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.24 (C:\Users\Sara
\AppData\Local\Programs\MiKTeX\tex/latex/revtex\revsymb...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.24 (C:\Users\Sara\AppData
\Local\Programs\MiKTeX\tex/latex/revtex\revsymb...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.24 (C:\Users\Sara\AppData\Local
\Programs\MiKTeX\tex/latex/revtex\revsymb...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no x in font nullfont!
! Undefined control sequence.
l.24 ...l\Programs\MiKTeX\tex/latex/revtex\revsymb
4-2.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no 4 in font nullfont!
l.27 LaTeX Info: Redefining \REV@mathfrak
on input line 128.
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no o in font nullfont!
Missing character: There is no : in font nullfont!
! Undefined control sequence.
l.29 (C:\Users
\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graph...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.29 (C:\Users\Sara
\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graph...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.29 ...s\Sara\AppData\Local\Programs\MiKTeX\tex
/latex/graphics\graphicx.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no / in font nullfont!
!
Missing character: There is no s in font nullfont!
! Undefined control sequence.
l.29 ...rograms\MiKTeX\tex/latex/graphics\graphicx
.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no . in font nullfont!
Missing character: There is no ) in font nullfont!
Overfull \hbox (20.0pt too wide) in paragraph at lines 24--31
[]
[]
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.32 (
C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyva...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Missing character: There is no ( in font nullfont!
Missing character: There is no C in font nullfont!
Missing character: There is no : in font nullfont!
! Undefined control sequence.
l.32 (C:\Users
\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyva...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no c in font nullfont!
Missing character: There is no s in font nullfont!
! Undefined control sequence.
l.32 ...\Programs\MiKTeX\tex/latex/graphics\keyval
.sty
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no . in font nullfont!
!
Missing character: There is no e in font nullfont!
! Undefined control sequence.
l.34 \KV@toks@
=\toks18
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no = in font nullfont!
! Missing { inserted.
<to be read again>
)
l.35 )
A left brace was mandatory here, so I've put one in.
You might want to delete and/or insert some corrections
so that I will find a matching right brace soon.
(If you're confused by all this, try typing `I}' now.)
)
Runaway text?
) (C:\Users \Sara \AppData \Local \Programs \MiKTeX \tex /latex/gra\ETC.
! File ended while scanning text of \toks.
<inserted text>
}
l.2 \usepackage
{graphicx,times,bm,bbm,bbold,amssymb,amsmath,amsfonts,dsfont,...
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
)
Runaway text?
) (C:\Users \Sara \AppData \Local \Programs \MiKTeX \tex /latex/gra\ETC.
! File ended while scanning text of \toks.
<inserted text>
}
<*> ./aipsamp.tex
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
! Emergency stop.
<*> ./aipsamp.tex
*** (job aborted, no legal \end found)
Here is how much of TeX's memory you used:
1669 strings out of 475385
21889 string characters out of 2776434
419191 words of memory out of 3000000
23144 multiletter control sequences out of 15000+600000
469567 words of font info for 29 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
33i,2n,37p,279b,93s stack positions out of 10000i,1000n,20000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!
和
Class revtex4-2 Warning: No type size specified, using default 10.
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/revtex\aps10pt4-2.rtx
File: aps10pt4-2 2020/10/03 4.2e (https://journals.aps.org/revtex/ for document
ation)
Class revtex4-2 Info: RevTeX pointsize 10pt selected on input line 39.
) (C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/textcase\textcase.st
y
Package: textcase 2022/06/12 v1.02 Text only upper/lower case changing (DPC)
Package textcase Info: Defining Legacy names on input line 20.
) (C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/url\url.sty
\Urlmuskip=\muskip16
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
)
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/natbib\natbib.sty
Package: natbib 2010/09/13 8.31b (PWD, AO)
\bibhang=\skip49
\bibsep=\skip50
LaTeX Info: Redefining \cite on input line 694.
\c@NAT@ctr=\count266
)
Class revtex4-2 Info: Repairing natbib's \BibitemShut on input line 7665.
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/revtex\revsymb4-2.sty
Package: revsymb4-2 2020/10/03 4.2e (https://journals.aps.org/revtex/ for docum
entation)
LaTeX Info: Redefining \REV@mathfrak on input line 128.
))
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks18
)
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics\trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
)
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\graphics.
cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 107.
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\pdftex.de
f
File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex
))
\Gin@req@height=\dimen138
\Gin@req@width=\dimen139
) (C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/psnfss\times.sty
Package: times 2020/03/25 PSNFSS-v9.3 (SPQR)
答案1
日志文件抱怨在序言中设置了文本(“缺少开始文档”)并且在设置字体之前设置了文本(“nullfont”)
Missing character: There is no C in font nullfont!
Missing character: There is no l in font nullfont!
具体来说,第 1 行包含 不应该revtex4-2.cls
包含的文本。Cl...
您稍后的编辑证实了这一点,并显示文件开始
Class revtex4-2 Warning: No type size specified, using default 10.
(C:\Users\Sara\AppData\Local\Programs\MiKTeX\tex/latex/revtex\aps10pt4-2.rtx
File: aps10pt4-2 2020/10/03 4.2e (https://journals.aps.org/revtex/ for document
ation)
这显然是您之前运行的日志文件,但somefile.log
它并没有被保存,而是revtex4-2.cls
从您的系统中删除了真正的 revtex 代码。
您需要删除该文件,然后使用 miktex 控制台强制重新安装 revtex。