1

I'm writing some notes and to make things easy to reference clearly, I'm adopting the convention of having my theorems, corollarys, definitions, etc. all share the same counter.

% environments
\newtheorem{theorem}{Theorem}[subsection]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{remark}[theorem]{Remark}

But a problem with this is that my Examples and Remarks are all italicized (just like the theorem environment), which I don't like. Is there a straight-forward way to change this?

New contributor
doggo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
5
  • 1
    Welcome to TeX.SE. Please tell us if you use a package such as amsthm or ntheorem to help create theorem-like environments.
    – Mico
    Commented Jul 9 at 23:56
  • 1
    I'm using amsmath and amssymb but not amsthm.
    – doggo
    Commented Jul 10 at 0:09
  • @Mico Not sure if that addresses the unified counter requirement or not?
    – cfr
    Commented Jul 10 at 2:00
  • I think it will be harder than I thought to get the behaviour I really want, but I agree with @Mico that the referenced question is similar to this one. Thank you!
    – doggo
    Commented Jul 10 at 2:58
  • 1
    @cfr - Going by the OP's code snippet, it looks like they have already solved the unified-counter issue on their own. I'll post a sample answer to make sure both of the OP's objectives are dealt with.
    – Mico
    Commented Jul 10 at 3:54

1 Answer 1

1

I suggest that you start loading amsthm in addition to amsmath and amssymb. That way, you'll have access to pre-defined theorem styles called definition and remark, in addition to the default theorem theorem style.

It looks to me like you've already solved the unified-counter issue.

enter image description here

\documentclass{article} 
\usepackage{amsmath,amssymb}

\usepackage{amsthm}
%\theoremstyle{theorem} % 'theorem' is the default style
\newtheorem{theorem}{Theorem}[subsection]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}

\theoremstyle{definition} % header: bold; body: upright non-bold
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}

\theoremstyle{remark} % header: italic non-bold; body: upright non-bold
\newtheorem{remark}[theorem]{Remark}

\begin{document}

\setcounter{section}{2} % just for this example
\setcounter{subsection}{3}

\begin{theorem} Hello, World.    \end{theorem}
\begin{corollary} Hello, World.  \end{corollary}
\begin{lemma} Hello, World.      \end{lemma}
\begin{definition} Hello, World. \end{definition}
\begin{example} Hello, World.    \end{example}
\begin{remark} Hello, World.     \end{remark}

\end{document}
3
  • 1
    Thanks .......!
    – cfr
    Commented Jul 10 at 9:36
  • 1
    This specifically addresses an issue that I had but failed to vocalize, namely to keep the bold headings while getting rid of the italicized statements, as you did with Definition and Example. Thank you!
    – doggo
    Commented Jul 10 at 20:29
  • For anyone looking to customize further, see @percusse's answer here
    – doggo
    Commented Jul 10 at 20:34

Not the answer you're looking for? Browse other questions tagged .