In an article class:
- How to make the chapter heading centered?
- The command
\sectionor\chapteris come with the error "undefined control sequence" when it is compiled.
How to overcome this?
In an article class:
\section or \chapter is come with the error "undefined control sequence" when it is compiled.How to overcome this?
The titlesecpackage is there for that. This should do it just fine :
\usepackage{titlesec}
\titleformat*{\section}{\centering}
titlesec only, if you use a class to which it is really compatible. titlesec is not compatible with all article classes.
– Schweinebacke
Jun 28 '17 at 10:18
\chapter. You need to usereportor a similar class for this. – TeXnician Jun 28 '17 at 06:56\chapter, so usually\chapteris undefined. How to center section headings depends on the class, e.g.,scrartclprovides\raggedsectionthat can be set to\centering.memoiralso has its own interface. Other classes may need extra packages. So please add a minimal but working example (MWE) to your question. And tell us as exact as possible, what you've done and what you expect. BTW: You should ask only one question per question. – Schweinebacke Jun 28 '17 at 08:40