I’m getting an “undefined control sequence” error with the following code, using TeXstudio:
\documentclass[11pt]{article}
\begin{document}
\begin{center}
\chapter{CHAPTER 6}
\end{center}
\end{document}
I’m getting an “undefined control sequence” error with the following code, using TeXstudio:
\documentclass[11pt]{article}
\begin{document}
\begin{center}
\chapter{CHAPTER 6}
\end{center}
\end{document}
The article class doesn't define the \chapter command, because articles don’t have chapters. Instead they have sections, subsections, etc. If you really want to use article, then you might want to consider using \section, \subsection and so on.
If you really want to use the \chapter command, then I’d suggest using the book or report document classes.
Separately, you generally shouldn’t use \begin{center} … \end{center} for headings. It’s really better used to make lists or similar. A better way to centre your title headings is to use the titlesec package, which is described in another question on TeX.se.
Still it shows “undefined control sequence” error in \chapter{Introduction}
– Amit Amola Aug 16 '23 at 17:54Command \chapter is undefined in article. It is defined in book or report.
articleclass doesn't have a\chaptercommand. Maybe you want to use thereportorbookclass. – egreg Jun 01 '13 at 15:39