什么时候 nonstopmode 不是 nonstopmode?

什么时候 nonstopmode 不是 nonstopmode?

我之前理解的打字 pdflatex -interaction=nonstopmode 与在序言中使用 \nonstopmode 是一样的,而且,排版不会在发现错误时停止。显然两者都不是。即使使用上面的命令,以下 MWE 也会在错误处停止。但是,如果取消注释 \nonstopmode,则编译会像预期的那样不停地进行到最后。此外,如果将 jfm.cls 替换为 article.cls,行为也符合预期——也就是说,使用上面的命令,即使注释掉 \nonstopmode,编译也会继续到最后。

现在,jfm.cls 是一个日志类文件,可以从以下位置下载 http://arxmliv.kwarc.info/sty/jfm.cls 我还没有深入研究过这个问题。不过,这并不是重点。重点是这个类文件中的某些内容阻止了 -pdflatex interaction=nonstopmode按照宣传的方式工作,并且它的行为与在序言中放置 \nonstopmode 不同。使用 TeXlive 2017。

要么我遗漏了什么(通常如此),要么就是有什么不对劲;无论如何,这里是 MWE,任何关于正在发生的事情的建议都将受到赞赏。

%\documentclass{article}  
\documentclass{jfm}  
%\nonstopmode
\begin{document}
Here is an error: a^b
\end{document}`

Hee 是日志文件,使用pdflatex -interaction=nonstopmode test.tex我必须输入“r”才能继续编译。

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2016.10.4)  12 MAR 2018 22:33
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**test
(./test.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/Users/gkv/latex/sty/jfm.cls
Document Class: jfm 2006/11/13 v1.27 Journal of Fluid Mechanics document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)

(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2016/05/09 v1.0r Standard LaTeX Graphics (DPC,SPQR)

(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/01/02 v1.10 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 96.

(/usr/local/texlive/2016/texmf-dist/tex/latex/pdftex-def/pdftex.def
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX

(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count79
))
\Gin@req@height=\dimen102
\Gin@req@width=\dimen103
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count80
)
LaTeX Info: Redefining \textsfbi on input line 183.
LaTeX Font Info:    Redeclaring math alphabet \mathsfbi on input line 183.
LaTeX Font Info:    Overwriting math alphabet `\mathsfbi' in version `normal'
(Font)                  OT1/cmss/m/sl --> T1/phv/b/it on input line 183.
LaTeX Font Info:    Overwriting math alphabet `\mathsfbi' in version `bold'
(Font)                  OT1/cmss/m/sl --> T1/phv/b/it on input line 183.
LaTeX Info: Redefining \textsfbi on input line 187.
LaTeX Font Info:    Redeclaring math alphabet \mathsfbi on input line 187.
LaTeX Font Info:    Overwriting math alphabet `\mathsfbi' in version `normal'
(Font)                  T1/phv/b/it --> OT1/phv/b/it on input line 187.
LaTeX Font Info:    Overwriting math alphabet `\mathsfbi' in version `bold'
(Font)                  T1/phv/b/it --> OT1/phv/b/it on input line 187.
\halflineskip=\skip41
\affilskip=\skip42
\c@part=\count81
\c@section=\count82
\c@subsection=\count83
\c@subsubsection=\count84
\c@paragraph=\count85
\@indentskip=\skip43
\smallindent=\skip44
\@footindent=\skip45
\@leftskip=\skip46
\proofbox=\box26
\rpbdim=\skip47
\@stequation=\toks15
\c@subequation=\count86
\c@table=\count87
\c@figure=\count88
LaTeX Info: Redefining \cite on input line 1156.
\astrutbox=\box27


Found the 'amsbsy' package on the system, using it.

(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols

(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks16
\ex@=\dimen104
)
\pmbraise@=\dimen105
)


Found AMS Euler Roman fonts on the system, using the 'upmath' package.

(/Users/gkv/latex/sty/upmath.sty
Package: upmath 1996/10/20 v1.0 CUP LaTeX2e package
\c@mv@upright=\count89
\c@mv@boldupright=\count90
LaTeX Font Info:    Overwriting symbol font `letters' in version `upright'
(Font)                  OML/cmm/m/it --> OML/eur/m/n on input line 65.
LaTeX Font Info:    Overwriting symbol font `letters' in version `boldupright'
(Font)                  OML/cmm/m/it --> OML/eur/b/n on input line 66.
)


Found AMS Symbol fonts on the system, using the 'amssymb' package.

(/usr/local/texlive/2016/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols

(/usr/local/texlive/2016/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
)))
(/usr/local/texlive/2016/texmf-dist/tex/latex/natbib/natbib.sty
Package: natbib 2010/09/13 8.31b (PWD, AO)
\bibhang=\skip48
\bibsep=\skip49
LaTeX Info: Redefining \cite on input line 694.
\c@NAT@ctr=\count91
) (./test.aux)
\openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.

(/usr/local/texlive/2016/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen106
\scratchbox=\box28
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks17
\MPscratchCnt=\count95
\MPscratchDim=\dimen107
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks18
) (/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2016/05/10 v0.21 Utility functions of pdfTeX for LuaTeX (HO
)

(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf

(/usr/local/texlive/2016/texmf-dist/tex/latex/oberdiek/grfext.sty
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)

(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
(/usr/local/texlive/2016/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)

(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)

(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
(etexcmds)             that some package has redefined \expanded.
(etexcmds)             In the latter case, load this package earlier.
)))
Package grfext Info: Graphics extension search list:
(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext)             \AppendGraphicsExtensions on input line 456.

(/usr/local/texlive/2016/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
! Missing $ inserted.
<inserted text> 
                $
l.5 Here is an error: a^
                        b
? r
OK, entering \nonstopmode...
LaTeX Font Info:    Try loading font information for U+msa on input line 5.
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info:    Try loading font information for U+msb on input line 5.

(/usr/local/texlive/2016/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
! Missing $ inserted.
<inserted text> 
                $
l.6 \end{document}

I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.

[1{/usr/local/texlive/2016/texmf-var/fonts/map/pdftex/updmap/pdftex.map}
Non-PDF special ignored!] (./test.aux) ) 
Here is how much of TeX's memory you used:
 2775 strings out of 493014
 35477 string characters out of 6133351
 94921 words of memory out of 5000000
 6300 multiletter control sequences out of 15000+600000
 5968 words of font info for 24 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 38i,8n,28p,798b,153s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2016/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmmi7.pfb></usr/local/texlive/2016/texmf-dist/fonts
/type1/public/amsfonts/cm/cmr10.pfb>
Output written on test.pdf (1 page, 19413 bytes).
PDF statistics:
 16 PDF objects out of 1000 (max. 8388607)
 10 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

答案1

它不是在标准配置中使用测试文件调用的,但如果类最终调用,\checkfonts那么它将“重新启动”(或在本例中启动)\errorstopmode

您可以编辑文件以替换\errorstopmode\nonstopmode1099 行

相关内容