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:
\documentclass[12pt]{book}
\usepackage[spanish]{babel}
\usepackage[width=13cm, height=19cm, top=2cm, papersize={16.5cm,24cm}]{geometry}
\usepackage[pdftex]{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{appendix}
\usepackage[titletoc]{appendix}
\usepackage{amssymb}
\usepackage{tipa}
%\usepackage{txfonts}
\usepackage{textcomp}
%\usepackage{amsthm}
%\usepackage{array}
%\usepackage{xy}
\usepackage{fancyhdr}
\newtheorem{example}{Example}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}
\setlength{\footskip}{0in}
\renewcommand{\footruleskip}{0pt}
\fancypagestyle{plain}{%
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
}
%
\parindent 0in
%\parskip 0.05in
%
\begin{document}
Hello, there!
\end{document}