1

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:

defn not aligned

The "definition" is not aligned with the rest of the text.

nox
  • 4,160
  • 12
  • 26

1 Answers1

0

Use like this

\newcounter{defctr}

\newenvironment{defn}%

{\noindent%

\refstepcounter{defctr}%

\textbf{Definition \thesubsection.\thedefctr:}%

}{\par\noindent%

\ignorespacesafterend}%