1
\documentclass[12pt]{article}
\usepackage{amsmath,amsfonts,mathtools,authblk,amssymb,amsthm}
\newtheorem{theorem}{Theorem}[section]     
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{obs}[theorem]{Observation}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{note}{Note}[section] 
\newtheorem{conjecture}[theorem]{Conjecture}


\usepackage[style=numeric, sorting=anyt]{biblatex}
\addbibresource{References.bib}
\allowdisplaybreaks
\date{}
\title{Title}
\author{}
\affil{}

\begin{document}
%   \maketitle


    \begin{abstract}


    \end{abstract}

    \textbf{Keywords:} 
    \\
    \\
    \textbf{2010 Mathematics Subject Classification:} 

    \section{Introduction}
    \label{Sec1}

    \begin{example}
        This is an example.
    \end{example}

        \begin{note}
            This is a note.
        \end{note}

    \begin{lemma}
        This is a lemma.
    \end{lemma}

     \begin{theorem}
        This is a theorem.
     \end{theorem}
 \begin{proof}
    This is a proof.
 \end{proof}
\begin{definition}
    This is a definition.
\end{definition}

    %\printbibliography

\end{document}

The above is a minimal working code for writing an academic paper. My problem is whenever I am using the environments "definition, theorem, example, note" etc, everything under it gets written down in italics. But if I write anything under \begin{proof} \end{proof}, it gets written down in normal font. Can someone please say why it happens. I have shown it in the code attached above.

I want to write everything under the environment \begin{example} \end{example} in normal fonts. Is that possible?

Another question is that can we modify the environments definition, theorem, example, note in such a way that we can write the contents under it in whatever way we wish i.e. we can control whether it will be italic or in normal font.

If someone can please help me out, I will be thankful.

Mico
  • 506,678
Charlotte
  • 963

1 Answers1

1

Let's begin with two excerpts from section 4, "Changing styles for theorem-like environments", of the user guide of the amsthm package [yellow highlighting added]:

enter image description here

enter image description here


You asked,

I want to write everything [in] the environment example in normal fonts. Is that possible?

Yes. Either the definition or the remark theorem style should be appropriate for your use case.

You further wrote,

Another question is that can we modify the environments definition, theorem, example, note in such a way that we can write the contents under it in whatever way we wish i.e. we can control whether it will be italic or in normal font[?]

The answer is also "Yes". I would strongly encourage you to read subsection 4.3, "New theorem styles", of the user guide of the amsthm package.


Note the use of upright lettering in the example environment.

enter image description here

\documentclass[12pt]{article}
\usepackage{mathtools,amssymb}
\allowdisplaybreaks

\usepackage{amsthm} % \theoremstyle{plain} %% that's the default \newtheorem{note}{Note}[section] \newtheorem{theorem}{Theorem}[section] \newtheorem{corollary}[theorem]{Corollary} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{obs}[theorem]{Observation} \newtheorem{definition}[theorem]{Definition} \newtheorem{remark}[theorem]{Remark} \newtheorem{notation}[theorem]{Notation} \newtheorem{problem}[theorem]{Problem} \newtheorem{claim}[theorem]{Claim} \newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{definition} % <-- switch to a different theorem style \newtheorem{example}[theorem]{Example}

\begin{document}

\begin{example} This is an example. \end{example}

\begin{note} This is a note. \end{note}

\begin{lemma} This is a lemma. \end{lemma}

\begin{theorem} This is a theorem. \end{theorem}

\begin{proof} This is a proof. \end{proof}

\begin{definition} This is a definition. \end{definition}

\end{document}

Mico
  • 506,678