# How to number lemmas according to theorem counter

I am using a llncs.csl template to write a paper. And I want to do the following numbering for lemma:

Theorem 1, Lemma 1.1, Lemma 1.2, Theorem 2, Lemma 2.1, Lemma 2.2

The template use \spn@wtheorem{lemma}{Lemma}{\bfseries}{\itshape}

Can you please help me how i can make changes in templete so it can number lemma according to theorem number.

• If the Theorem environment is called theorem, then you might try this: \spnewtheorem{lem}{Lemma}[theorem]{\bfseries}{\itshape} and then you can do \begin{lem}...\end{lem}. However, we can probably provide more help if you are able to produce a minimal working example, see here: tex.meta.stackexchange.com/questions/228/… – rbrignall Feb 6 '20 at 11:12
• I've removed the biblatex tag as it is not relevant for the question – daleif Feb 6 '20 at 11:50
• I tried useing \spnewtheorem{lem}{Lemma}[theorem]{\bfseries}{\itshape} but it give me error "Missing \begin{document}. \spn@wtheorem{lemma}{Lemma}[theorem].." – TaniaMalik Feb 6 '20 at 12:03
• Also I am using lncs format (Springer) template – TaniaMalik Feb 6 '20 at 12:04

You could just redefine the lemma counter.

\documentclass{svjour3}

\counterwithin{lemma}{theorem}

\begin{document}

\begin{theorem}
A theorem
\end{theorem}

\begin{lemma}
A lemma
\end{lemma}

\begin{lemma}
Another lemma
\end{lemma}

\begin{theorem}
A theorem
\end{theorem}

\begin{lemma}
A lemma
\end{lemma}

\begin{lemma}
Another lemma
\end{lemma}

\end{document}


• Where I have to put this lemma redefinition? I have springer template which has these lines \spn@wtheorem{case}{Case}{\itshape}{\rmfamily} \spn@wtheorem{conjecture}{Conjecture}{\itshape}{\rmfamily} %\spn@wtheorem{lemma}{Lemma}{\bfseries}{\itshape} – TaniaMalik Feb 6 '20 at 12:16
• @TaniaMalik You place the \counterwithin{lemma}{theorem} line before \begin{document} – egreg Feb 6 '20 at 13:11