5

It seems \renewcommand{\theexample}{\Alph{example}} makes the section numbering disappear. Is there a way to avoid this?

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{definition}
\newtheorem{example}{Example}[section]
\renewcommand*{\theexample}{\Alph{example}}

\begin{document}
\section{Intro}
\begin{example}[special curve]
Let something be something.
\end{example}
\section{Outro}
\begin{example}[special manifold]
Let something be something.
\end{example}
\end{document}
0

1 Answer 1

9

When you do

\newtheorem{example}{Example}[section]

then \theexample is defined by

\newcommand{\theexample}{\thesection.\arabic{example}}

and the example counter is reset any time section is stepped.

So you want to redefine \theexample by

\renewcommand*{\theexample}{\thesection.\Alph{example}}
1
  • FWIW, this also saved me for the LIPIcs 2016 style, where theorem numbering seems broken for theorems defined in the appendix. Just do a \renewcommand*\thetheorem{\thesection.\arabic{theorem}} in the appendix and it's fine again.
    – srs
    Jan 3, 2017 at 0:06

You must log in to answer this question.

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