Solving LaTeX Numbering Problems in Projects

  • Context: LaTeX 
  • Thread starter Thread starter latentcorpse
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary
SUMMARY

The discussion focuses on resolving numbering issues in LaTeX documents, specifically for definitions within sections. The user aims to format definitions to reflect section-based numbering, such as "1.1.1" for definitions in section "1.1". The suggested solution involves using the command \numberwithin{equation}{section} in the preamble, which successfully adjusts equation numbering but does not affect definitions. Further assistance is sought for achieving the desired definition numbering format.

PREREQUISITES
  • Familiarity with LaTeX document preparation system
  • Understanding of LaTeX theorem environments
  • Knowledge of LaTeX preamble configurations
  • Experience with sectioning commands in LaTeX
NEXT STEPS
  • Research the \numberwithin command for custom numbering in LaTeX
  • Explore the amsmath package for advanced theorem and definition formatting
  • Learn about the cleveref package for improved referencing in LaTeX
  • Investigate the use of \newtheorem with section-based numbering
USEFUL FOR

This discussion is beneficial for LaTeX users, academic writers, and researchers looking to enhance the formatting of their documents, particularly in managing theorem and definition numbering effectively.

latentcorpse
Messages
1,411
Reaction score
0
Hi. I'm writing a project and am using a template latex document with the idea being that i don't have to worry about the preamble etc and also so that includes important stuff automatically like university and degree name etc.

anyway, in my preamble i have:

\newtheorem{lemma}{Lemma}
\newtheorem{theorem}[lemma]{Theorem}
\newtheorem{corollary}[lemma]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[lemma]{Definition}
\theoremstyle{remark}
\newtheorem{remark}[lemma]{Remark}
\newtheorem{example}[lemma]{Example}

and i have been using the definition environment of this and it's working fine except for the numbering. for example in section 1.1 of my document i have definition 1, definition 2 and definition 3. then i go to section 1.2 and get definition 4. this is going to be a long project so by the time i finish i'll be getting things like definition 80!

i think it would look more professional (tell me if you disagree though!) if i could get the definitions in section 1.1 to be definition 1.1.1, definition 1.1.2 and deifnition 1.1.3 and then in section 1.2 have definition 1.2.1

does anybody know how to do this?

all help appreciated
thanks
 
Physics news on Phys.org
Try this: \numberwithin{equation}{section} in your preamble. Not sure whether that will work for theorems, though...
 
hey. thanks for the reply. it works for tidying up the numbering of my equations but the definitions are still unchanged. any other recommendations?

cheers.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 11 ·
Replies
11
Views
6K