# Linebreak in definition heading (theorem package) [duplicate]

I have a problem with a too long line in the theorem environment. The following example shows the problem, I need a line break in the heading, but there is none. Any suggestions?

\documentclass[a4paper,10pt,twocolumn]{article}

\usepackage{theorem}
\theorembodyfont{\normalfont\slshape}
\newtheorem{definition}{Definition}}

\begin{document}

\begin{definition}[Long heading that should have a line break]
A definition is a statement of the meaning of a term (a word, phrase, or other set of symbols).
Definitions can be classified into two large categories, intensional definitions (which try to give the essence of a term) and extensional definitions (which list every single object that a term describes).
A term may have many different senses and multiple meanings, and thus require multiple definitions.
\end{definition}

\end{document}


With the help of another topic I found a solution myself, if anyone is interested, the solution is below. I switched the package "theorem" with "ntheorem" and added some formation commands, which I adapted from another topic:

\documentclass[a4paper,10pt,twocolumn]{article}

\usepackage{ntheorem}

\makeatletter
\makeatother

\theorembodyfont{\normalfont\slshape}
\newtheorem{definition}{Definition}}

\begin{document}

\begin{definition}[Long heading that should have a line break]
A definition is a statement of the meaning of a term (a word, phrase, or other set of symbols).
Definitions can be classified into two large categories, intensional definitions (which try to give the essence of a term) and extensional definitions (which list every single object that a term describes).
A term may have many different senses and multiple meanings, and thus require multiple definitions.
\end{definition}

\end{document}


Note 1: Can some mod please mark this as solved? (Or delete it, if this is an uninteresting question.) I somehow wasn't able to login first so I asked this question as guest and now found a solution myself.

Note 2: This solution is different compared to the ones already present in this forum! This solution does not work with theorem package and this solution requires eight more lines of code plus the result is different (I don't want a line break AFTER the heading just INSIDE the heading).