TexMaker 生成 !Missing \endcsname

TexMaker 生成 !Missing \endcsname

我已经有一段时间没做过 TeX 了。我正在 Mac 上使用 TeXMaker:

\begin 
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\author{me}
\title{my title}
\begin{document}
\part{Part One}
Text
\end{document}

它声称第 2 行有一个错误:

LOG FILE :
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=latex 2018.4.16) 4 JUL 2018 14:57
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**my-file-name.tex
(./my-file-name.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
! Missing \endcsname inserted.
<to be read again>
\let
l.2 \documentclass
[10pt,a4paper]{article}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.
! TeX capacity exceeded, sorry [input stack size=5000].
\documentclass ->\let \documentclass
\@twoclasseserror \if@compatibility \el...
l.2 \documentclass
[10pt,a4paper]{article}
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.
Here is how much of TeX's memory you used:
5 strings out of 492650
179 string characters out of 6129648
60420 words of memory out of 5000000
3988 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
5000i,0n,4p,64b,16s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.

我使用 texmaker 中的“快速启动”功能获取了此代码。我完全搞不懂,为什么它会卡在这段代码上。

我有一种理论,那就是我缺少一个包或其他东西,但这个错误没有意义,而且 texmaker 也没有提示我输入包。我没有看到任何地方可以管理包。

当我(单独)安装 Tex 时,我使用 TexLive 来安装包,并且看起来我至少有 amsmath 包。

amsmath 至少在那里

知道哪里出了问题吗?我只想测试一下 TexMaker,这样我就可以写一篇论文了。

答案1

文件第一行的 \begin 导致了这个问题。

相关内容