1

When using the amsart documentclass I encounter the following numeration issue. When creating sections and subsections and writing definitions in them, the numeration of subsections and definitions/theorems interact with one another, e.g. when creating a theorem in subsection 1 and then creating a subsection after subsection 1, it says subsection 1.3 instead subsection 1.2. Furthermore the word "Definition" is written in a bold style, I would like to remove this to make it more plain, is that possible? I apologize if my code is bad, I am self taught in Latex. Thanks in advance for any help!

Code:

\documentclass{amsart}

\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[babel=true]{microtype}
\usepackage{amsfonts}
\usepackage{titlesec}

\newtheorem{defi}[subsection]{Definition}

\titleformat{\section}[hang]{\scshape}{\thesection. }{0pt}{\centering}[]
\titleformat{\subsection}[hang]{\scshape}{\thesubsection. }{0pt}{\centering}[]

\title{A title}

\begin{document}
\maketitle

\section{Section 1}
\subsection{Subsection 1}

\begin{defi} A definition
\end{defi}

\subsection{Subsection 2}
\end{document}
5
  • Welcome to TeX.SX! How should definitions be numbered? Should it be totally independent of the section or subsection number? Or should the definitions be numbered within sections (so that the second definition of section 1 would be numbered 1.2)? Or within subsections?
    – Vincent
    May 30, 2021 at 13:14
  • @Vincent I would like to have the Definitions be numbered independently of the subsections but respecting the section they are in. Meaning that Definition 1.3 should be the third Definition or Theorem that appears in Section 1, Definition 2.5 being the fifth Definition/Theorem that appears in section 2 and so on. I think this is the most common way to numerate Definitions/Theorems? If not, I am also open to new ideas, but I usually dislike numbering a Definition/Theorem with 3 numbers, if its avoidable.
    – user243350
    May 30, 2021 at 13:18
  • \newtheorem{defi}[subsection]{Definition} means that Defintions and subsections use the same counter, if you don't want that, delete the optional argument. It seems what you want is the default behaviour. or \newtheorem{defi}{Definition}[section] if you want definitions numbered within sections May 30, 2021 at 13:28
  • @DavidCarlisle Thank you. However when I do that, it only says Definition 1 Definition 2 etc. not respecting the section they are in. Furthermore, Theorems and Definitions don't respect each other, meaning Definition 1 followed by a Theorem will result in Theorem 1. I would like to have Definition 1.1 followed by Theorem 1.2 Theorem 1.3 Definition 1.4 and so on (if these are in section 1).
    – user243350
    May 30, 2021 at 13:33
  • as I say use teh second optional argument if you want it numbered within sections. May 30, 2021 at 15:19

1 Answer 1

0

Is this what you're looking for?

\documentclass{amsart}

\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[babel=true]{microtype}
\usepackage{titlesec}

\newtheorem{thm}{Theorem}[section]
\newtheoremstyle{defis}%
    {3pt}% Space above
    {3pt}% Space below
    {}% Body font
    {}% Indent amount
    {\scshape}% Head font
    {.}% Punctuation after theorem head
    {.5em}% Space after theorem head
    {}% Theorem head spec (can be left empty, meaning 'normal')
\theoremstyle{defis}
\newtheorem{defi}[thm]{Definition}

\titleformat{\section}[hang]{\scshape}{\thesection. }{0pt}{\centering}[]
\titleformat{\subsection}[hang]{\scshape}{\thesubsection. }{0pt}{\centering}[]

\begin{document}

\section{Section 1}
\subsection{Subsection 1}

\begin{defi}
A definition
\end{defi}

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

\begin{defi}
Another definition
\end{defi}

\subsection{Subsection 2}
\end{document}

About the numbering

\newtheorem has two optional arguments (that cannot be used at the same time) to control numbering. To summarize the idea, you can call \newtheorem as

\newtheorem{<env name>}{<text>}[<parent counter>]

or as

\newtheorem{<env name>}[<shared counter>]{<text>}

With the first option, the theorem-like environment <env name> will be numbered within the <parent counter>, like subsections are usually numbered within sections. With the second option, the environment <env name> will be numbered with the counter <shared counter>.

There are more details at page 5 of the documentation.

About the styles

Theorem-like environments come in different styles that can be switched before declaring a new environment with \theoremstyle. Three styles (plain, definition and remark) are provided by amsthm, but you can define others with \newtheoremstyle.

There are more details at page 9 of the documentation.

3
  • Thank you so much, it appears that this is exactly what I was looking for! One question though, it appears that when using what you wrote, all theorem environments automatically use the non-bold style despite not having [thm] in the argument. Why is that the case? The numbering still does not work, until I implement the [thm] argument. Thank you! Edit: Unfortunatley I can't upvote, since I don't have enough reputation, I am sorry.
    – user243350
    May 30, 2021 at 13:40
  • @user243350 As I briefly explained in my answer, the styles are controlled with the \theoremstyle command. In my example, if you add more \newtheorems after \newtheorem{defi}..., they will be in the style defis that I declared right before. To change the style, call again \theoremstyle after the definition of defis.
    – Vincent
    May 30, 2021 at 13:43
  • Thanks a lot for your help and explanation.
    – user243350
    May 30, 2021 at 13:45

You must log in to answer this question.

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