1

I would like to have two different styles of theorems in my LaTeX document to differentiate between original and unoriginal work. For one I would like the 'Theorem' underlined and the other I would like without extra text decoration (as normal).

I use the amsthm package for theorems usually.


For example I would like two different theorems that look like the following would.

\textbf{Theorem 2.2.} \textit{blah blah blah}

\underline{\textbf{Theorem 2.3.}} \textit{blah blah blah}
2

Like this?

\documentclass{article}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[amsmath,thmmarks]{ntheorem}

\makeatletter 
 \newtheoremstyle{myu}%
  {\item[\hskip\labelsep \ \bf\underline{##1 \theorem@headerfont ##2.}]}%
\makeatother
\makeatletter 
 \newtheoremstyle{myn}%
  {\item[\hskip\labelsep \ \bf ##1 \theorem@headerfont ##2.]}%
\makeatother


\theoremstyle{myn}
\newtheorem{theoremn}{Theorem} %<-- Normal Theorem Definition
\theoremstyle{myu}
\newtheorem{theoremu}[theoremn]{Theorem}%<-- Underlined Theorem Definition

\begin{document}
\section{Introduction}
Theorems can easily be defined
\begin{theoremn}
Let $f$ be a function whose derivative exists in every point, then $f$ 
is a continuous function.
\end{theoremn}

\begin{theoremu}
Let $f$ be a function whose derivative exists in every point, then $f$ 
is a continuous function.
\end{theoremu}

\begin{theoremn}
Let $f$ be a function whose derivative exists in every point, then $f$ 
is a continuous function.
\end{theoremn}

\begin{theoremu}
Let $f$ be a function whose derivative exists in every point, then $f$ 
is a continuous function.
%\noindent\underline{\makebox[3mm][l]{Jane Doe}}
\end{theoremu}

\begin{theoremu}
Let $f$ be a function whose derivative exists in every point, then $f$ 
is a continuous function.
\end{theoremu}
\end{document}

enter image description here

  • No as you can see for my example, I would like the number underlined also (one continuous line). – Joshua Farrell Apr 3 at 11:36
  • @JoshuaFarrell, I have edited my answer. – ferahfeza Apr 3 at 13:51
  • \bf has been a deprecated command for more than 20 years. – egreg Apr 3 at 14:22
  • @egreg, Thank you for your warning. It sounds easy to use. – ferahfeza Apr 3 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.