LaTeX forum ⇒ GeneralUndefined control sequence error message

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 1
Joined: Tue Jul 07, 2020 1:54 pm

Undefined control sequence error message

Postby okafor_iyke » Tue Jul 07, 2020 2:47 pm

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[10pt,a4paper,oneside]{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsmath}
  4. \usepackage{amsfonts}
  5. \usepackage{amssymb}
  6. \begin{document}
  7. hello world
  8. \end{document}

above is simple code i wrote in latex, on compliing it. I got the error undefined control sequence \Documentclass

i am using Texmaker and Miktek

pls what do i do to solve this problem


Posts: 150
Joined: Fri Jan 03, 2020 2:39 pm

Postby Bartman » Tue Jul 07, 2020 3:13 pm

Don't hang your question on an old topic, but start a new one.

Please note that the commands are case sensitive.

User avatar
Ijon Tichy
Posts: 392
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Tue Jul 07, 2020 5:26 pm

Bartman wrote:Please note that the commands

and environments
Bartman wrote:are case sensitive.

And if you post an example please always test it before and post exactly what you've tested. And use the Code button or Select code button from the toolbar to mark your example as code. And please always copy&paste the exact error message from the log-file. And also use code tags for that paste, because line breaks and indents are valid for error messages and only preserved inside code tags.

BTW: 10pt and oneside are defaults of article and can be omitted. Since LaTeX 2018-04-01 UTF-8 is the default and
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \usepackage[utf8]{inputenc}
can be omitted.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9617
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jul 07, 2020 6:09 pm

Hi Lyke,

welcome to the forum!

It can simply be that you did not choose (pdf)LaTeX but pdf(TeX) as compiler, so \documentclass is undefined.

Stefan admin

Return to “General”

Who is online

Users browsing this forum: No registered users and 12 guests