When the documentclass is article, I can do \newtheorem*{example}{Example} so examples are not numbered. But when the documentclass is a book it show me error that says "Command * is already defined". Does anyone why it happens?

Also, is there any way so that the Example is not in italic?

The code:

\usepackage[width=13cm, height=19cm, top=2cm, papersize={16.5cm,24cm}]{geometry}

\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\parindent 0in
%\parskip 0.05in
Hello, there!

1 Answer 1


I do not think the book class is the issue, so without your code it's difficult to see what the issue is, but this might help:

This is a test.
This is an example.

enter image description here

  • Thanks, but that's what I've been trying. I wrote the code in the question.@Fintan
    – mug_donut
    Commented May 12, 2020 at 22:21
  • Try uncommenting \usepackage{amsthm}. Also, you are calling the appendix package twice, which is tripping my machine, so you should remove the duplicate in case it causes issues for anyone else trying to compile your code.
    – Fintan
    Commented May 12, 2020 at 22:27
  • Thanks it worked!
    – mug_donut
    Commented May 12, 2020 at 22:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .