0

I've just install the TexStudio 4.0 program. I want to compile the simple tex file:

\documentclass{article}
\begin{document}
Hello, \LaTeX\ world.
\end{document}

But the errors occur:

Undefined control sequence. \end{document}

This is the .log file

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.10) (preloaded format=pdflatex 2021.10.3)  5 OCT 2021 20:14
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2020-10-01> patch level 1
L3 programming layer <2020-10-05> xparse <2020-03-03>
("C:\Users\Dell OPT 3040\AppData\Local\Programs\MiKTeX\tex/latex/base\article.c
ls"
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class

("C:\Users\Dell OPT 3040\AppData\Local\Programs\MiKTeX\tex/latex/base\size10.cl
o"
File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
)
\c@part=\count175
\c@section=\count176
\c@subsection=\count177
\c@subsubsection=\count178
\c@paragraph=\count179
\c@subparagraph=\count180
\c@figure=\count181
\c@table=\count182
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
("C:\Users\Dell OPT 3040\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3ba
ckend-pdftex.def"
File: l3backend-pdftex.def 2020-09-24 L3 backend support: PDF output (pdfTeX)
\l__kernel_color_stack_int=\count183
\l__pdf_internal_box=\box47
) (test.aux)
\openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 4.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <5> on input line 4.

! Undefined control sequence.
<argument> ...n {para/end}\@kernel@after@para@end 
                                                  \mode_if_horizontal:TF {\i...
l.5 \end{document}
                  
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.
<argument> ...ara/after}\@kernel@after@para@after 
                                                  
l.5 \end{document}
                  
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.

[1

{C:/Users/Dell OPT 3040/AppData/Local/MiKTeX/pdftex/config/pdftex.map}]
(test.aux) ) 
Here is how much of TeX's memory you used:
 390 strings out of 480174
 7076 string characters out of 2875035
 269211 words of memory out of 3000000
 17090 multiletter control sequences out of 15000+200000
 535088 words of font info for 29 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 41i,4n,47p,128b,100s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Users/Dell OPT 3040/AppData/Local/Programs/MiKTeX/fonts/type1/p
ublic/amsfonts/cm/cmr10.pfb><C:/Users/Dell OPT 3040/AppData/Local/Programs/MiKT
eX/fonts/type1/public/amsfonts/cm/cmr7.pfb>
Output written on test.pdf (1 page, 20935 bytes).
PDF statistics:
 14 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
4
  • There doesn't appear to be anything wrong with the code fragment you have included. Please post the .log file here. Oct 5, 2021 at 12:34
  • Welcome to the site. You can "edit" your question in order to fulfil @IanThompson's request. Oct 5, 2021 at 13:02
  • Thank you for your help. I appreciate it
    – Le Thanh
    Oct 5, 2021 at 13:23
  • 1
    It looks like you need to update your MiKTeX installation to the latest version. Another user ran into a similar problem a few months ago. Oct 5, 2021 at 16:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.