mathmode 导致编译错误,\

mathmode 导致编译错误,\

我有这段乳胶代码:

\documentclass{paper}

\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}
\[
W_0=W\\
W_i= ext(W_{i-1}),\ i < \beta
\]
\end{document}

编译时我遇到这些问题:

  • 第 8 行:环境方程*未定义。[
  • 第 9 行:缺少插入的 $。W_
  • 第 11 行:\begin{document} 以 \end{equation*} 结束。]
  • 第 11 行:缺少插入 $。]

有什么建议么?

编辑 完整日志:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.2.4)  23 MAR 2020 23:14
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**document.tex
(./document.tex
LaTeX2e <2018-12-01>
(/usr/share/texlive/texmf-dist/tex/latex/paper/paper.cls
Document Class: paper 2008/05/30 1.0l LaTeX document class (wm).
\hours=\count80
\minutes=\count81
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\beforetitlespace=\skip41
\c@part=\count82
\c@section=\count83
\c@subsection=\count84
\c@subsubsection=\count85
\c@paragraph=\count86
\c@subparagraph=\count87
\exampleindent=\skip42
\c@figure=\count88
\c@table=\count89
\abovecaptionskip=\skip43
\belowcaptionskip=\skip44
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2018/12/01 v2.17b AMS math features
\@mathmargin=\skip45

For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text

(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks14
\ex@=\dimen103
))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen104
)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count90
LaTeX Info: Redefining \frac on input line 223.
\uproot@=\count91
\leftroot@=\count92
LaTeX Info: Redefining \overline on input line 385.
\classnum@=\count93
\DOTSCASE@=\count94
LaTeX Info: Redefining \ldots on input line 482.
LaTeX Info: Redefining \dots on input line 485.
LaTeX Info: Redefining \cdots on input line 606.
\Mathstrutbox@=\box27
\strutbox@=\box28
\big@size=\dimen105
LaTeX Font Info:    Redeclaring font encoding OML on input line 729.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 730.
\macc@depth=\count95
\c@MaxMatrixCols=\count96
\dotsspace@=\muskip10
\c@parentequation=\count97
\dspbrk@lvl=\count98
\tag@help=\toks15
\row@=\count99
\column@=\count100
\maxfields@=\count101
\andhelp@=\toks16
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks17
\multlinegap=\skip46
\multlinetaggap=\skip47
\mathdisplay@stack=\toks18
LaTeX Info: Redefining \[ on input line 2836.
LaTeX Info: Redefining \] on input line 2837.
)
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/08/11 v1.3c Input encoding file
\inpenc@prehook=\toks19
\inpenc@posthook=\toks20
)
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2018/08/11 v2.0j Standard LaTeX package

(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2018/08/11 v2.0j Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 48.
)) (./document.aux)
\openout1 = `document.aux'.

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


! LaTeX Error: Environment equation* undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.8     \[

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

! Missing $ inserted.
<inserted text> 
                $
l.9     W_
       0=W\\
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.


! LaTeX Error: \begin{document} ended by \end{equation*}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.11    \]

Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

! Missing $ inserted.
<inserted text> 
                $
l.11    \]

I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

LaTeX Font Info:    Try loading font information for T1+cmss on input line 12.
(/usr/share/texlive/texmf-dist/tex/latex/base/t1cmss.fd
File: t1cmss.fd 2014/09/29 v2.5h Standard LaTeX font definitions
) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}

] (./document.aux) ) 
Here is how much of TeX's memory you used:
 1223 strings out of 494553
 13406 string characters out of 6177378
 68854 words of memory out of 5000000
 4947 multiletter control sequences out of 15000+600000
 6391 words of font info for 19 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 27i,7n,21p,231b,222s stack positions out of 5000i,500n,10000p,200000b,80000s
 </home/younes/.texlive2019/texmf-var/fonts/pk/ljfour/jknap
pen/ec/ecrm1000.600pk> </home/younes/.texlive2019/texmf-var/fonts/pk/ljfour/jkn
appen/ec/ecrm0900.600pk></usr/share/texlive/texmf-dist/fonts/type1/public/amsfo
nts/cm/cmmi10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm
/cmmi7.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.
pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb>
Output written on document.pdf (1 page, 40047 bytes).
PDF statistics:
 38 PDF objects out of 1000 (max. 8388607)
 27 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)

**文件列表 (\listfiles) **

 *File List*
   paper.cls    2008/05/30 1.0l LaTeX document class (wm).
  size10.clo    2018/09/03 v1.4i Standard LaTeX file (size option)
 amsmath.sty    2018/12/01 v2.17b AMS math features
 amstext.sty    2000/06/29 v2.01 AMS text
  amsgen.sty    1999/11/30 v2.0 generic functions
  amsbsy.sty    1999/11/29 v1.2d Bold Symbols
  amsopn.sty    2016/03/08 v2.02 operator names
inputenc.sty    2018/08/11 v1.3c Input encoding file
 fontenc.sty
   t1enc.def    2018/08/11 v2.0j Standard LaTeX file
  t1cmss.fd    2014/09/29 v2.5h Standard LaTeX font definitions
 ***********

提前致谢,

答案1

更新 texlive 后问题消失sudo apt-get install texlive

相关内容