[Tex/LaTex] How to write Definition 2.1. in texmaker

typography

I am just want to write Defintion 2.1. in texmaker ? I already used

\subsection
\begin{definition}
\end{definition}  

but I can't found the output Definition 2.1. so please kindly tell us.

After writing Definition 2.1 by followed the answer here. I'm want to write Remark 2.1. as given the below answer but my output is Remark 2.2. so please do help me to write Remark 2.1.

Best Answer

May be this:

\documentclass{article}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[section]    %% this does it
\begin{document}
  \section{Some}
  \section{some other}
  \begin{definition}
    Some definition
  \end{definition}
\end{document}

enter image description here

Or this:

\documentclass{article}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[subsection]
\begin{document}
  \section{Some}
  \section{some other}
  \subsection{Some}
  \subsection{Other}
  \begin{definition}
    Some definition
  \end{definition}
  \begin{definition}
    Some other definition
  \end{definition}
\end{document}

enter image description here

Related Question