我刚刚安装了 LaTeX,并且一直在使用 vim 编辑 .tex 文档。无论我输入什么 pdftex 命令,它总是出现同样的问题。未定义的控制序列。
! Undefined control sequence.
1.1 \Documentclass
{article}
该文件是:
\Documentclass{article}
\begin{document}
this is some text
\end{document}
答案1
不要使用大写“D”
\documentclass{article}
\begin{document}
this is some text
\end{document}
输出
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./texto.tex
LaTeX2e <2022-06-01> patch level 5
L3 programming layer <2022-08-23>
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
(./texto.aux) [1] (./texto.aux) )
Output written on texto.dvi (1 page, 264 bytes).
Transcript written on texto.log.