Math-Mode – Editing Theorem Environments in LaTeX

hyperrefmath-modepackages

I have two questions about editing theorem environments on Tex.
I did not see concrete answers among answered questions, so I ask here mines, hoping that there are not frequently asked.

First, I would like to know how to create the left line form the underlined title and followed by a little line at the bottom of a theorem like on this picture :enter image description here
Then, which packages are needed to do that – and in which order (I encountered some trouble with adding some packages together, something like incompatibility, especially with "hyperref" and "ntheorem" packages)?

I am not an expert at all with Tex, so an answer like "cut and past it in your code" will be satisfying!

Thanks.

Best Answer

You can do this with thmbox package

\documentclass{article}
\usepackage{thmbox}
\newtheorem[L]{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem[S]{cor}[thm]{Corollary}

\begin{document}

\begin{lem}{First resualt}
Here a lemma
\end{lem}

\begin{thm}{Important}
Great theorem
\end{thm}

\begin{cor}{Final}
Here the corollary
\end{cor}

\end{document}

for ntheorem compatibilite may be

\usepackage[amsmath,hyperref,thmmarks]{ntheorem}

or if amsthm theorem style is used

\usepackage[amsthm,amsmath,hyperref,thmmarks]{ntheorem}