I'm having trouble aligning some text for math definitions that I am writing in LaTeX.
Here's what I currently have:
\newcounter{defctr}
\newenvironment{defn}
{\noindent
\refstepcounter{defctr}
\textbf{Definition \thesubsection.\thedefctr:}
}{\par\noindent%
\ignorespacesafterend}
\counterwithin*{defctr}{subsection}
In some cases, this works fine. However, there are a few instances in which it does not work in the way I want it to. Here is an example of the command not working properly:
The "definition" is not aligned with the rest of the text.

%(the comment character) immediately after\refstepcounter{defctr}? – Mico Jul 01 '18 at 23:19