0

I am typing presentation in Overleaf in beamer environment. My presentation has few sections and I'd like to have a numeration of my theorems and lemmas within sections. For example, in the first section it is Theorem 1.1 and in the second section it is Theorem 2.1, Lemma 2.2.

However in my case theorems and Lemmas do not have this and they enumerated just by 1,2,3....

Can anyone show how to do this please?

1
  • Please tell us which document class you employ and how you create the theorem-like environments at present. Do you employ a package such as amsthm or ntheorem to help create the theorem-like environments? Please also tell us if each theorem-like environment is supposed to have its own separate counter or if they are supposed to share a common counter.
    – Mico
    Feb 13, 2023 at 6:14

1 Answer 1

5

As you are not provided any MWE, my suggestion based on my guess only:

\counterwithin{theorem}{section}
4
  • 1
    You don't need to load the chngcntr package for this. Feb 13, 2023 at 8:58
  • @samcarter_is_at_topanswers.xyz Thanks for the info and I realized, should I modify the suggestion?
    – MadyYuvi
    Feb 13, 2023 at 14:13
  • 1
    Yes, I think it would be best to edit your answer. You could also remove the \begin{document}, this might make people think they can't use it in the preamble. Feb 13, 2023 at 14:16
  • 1
    Thank you for your answer! It helped me!
    – RFZ
    Feb 15, 2023 at 3:58

You must log in to answer this question.

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