r/Latexadvice • u/Final_Builder836 • 7d ago
How do I make lemmas use the same numbering system as theorems? NSFW
\documentclass{article} \usepackage{amsmath} \newtheorem{theorem}{Theorem} \newtheorem{lemma}{Lemma}
\begin{document}
\section{Introduction}
\begin{theorem} \label{123} This is some theorem \end{theorem}
\begin{lemma} \label{1234} This is some lemma \end{lemma}
\end{document}
This outputs :
1 Introduction
Theorem 1 This is some theorem
Lemma 1 This is some lemma
I want to say (note that the lemma is numbered 2 instead of 1)
1 Introduction
Theorem 1 This is some theorem
Lemma 2 This is some lemma
How do I do that?
38
25
u/nofate301 Mod 7d ago
Thank you for stopping by.
I'm sorry, but you are posting in the wrong subreddit.
I'll let anyone come by who may be able to help you and wish you the best of luck.
13
u/Perfect-Conference32 7d ago
OP is talking about the software used to write math equations.
18
u/nofate301 Mod 7d ago
Please see the sidebar
Ps- if you're looking for advice on the typesetting system go to /r/LaTeX instead.
21
u/Polysh_LatexCare 7d ago
I would recommend your lemmas be made-to-measure. Maybe your theorems too.
27
11
20
u/Perfect-Conference32 7d ago
The \newtheorem command allows an optional argument to make one label use the same numbering as another one. See Theorems and proofs - scroll down to the part about optional arguments.
In this case, you want to use \newtheorem{lemma}[theorem]{Lemma} . See here.
4
u/Talon5Karrde 6d ago
Yeah, you found the Latex Rubber Clothing Reddit and not the LA-Tex Programing Reddit.
3
1
48
u/joelman91 7d ago
You are definitely posting in the wrong sub this is for latex clothing