2

I am submitting a paper to a journal that requires labels like theorems, corollaries, proofs, and lemmas to be indented. Right now, these environments are flush to the left margin. How can I make this happen?

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{cite}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}

% for the journal
\usepackage[labelsep=period]{caption}
\captionsetup[table]{name=TABLE}
\renewcommand{\thetable}{\Roman{table}}
\usepackage{indentfirst}
\title{title}
\author{
    people
}


\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}


\begin{document}
\maketitle    

\begin{theorem}
theorem to be indented at the label
\end{theorem}


\begin{proof}
proof to be indented at the label
\end{proof}
2
  • 1
    You mean normal indented paragraphs or should the body of the theorem be indented as well?
    – egreg
    Commented May 20, 2021 at 17:29
  • @egreg The journal wants just the label indented, like it's a new paragraph. They don't want the entire body of the theorem to be indented, as well.
    – Ron Snow
    Commented May 20, 2021 at 17:30

2 Answers 2

4

You can load amsthm and define your own style. My answer https://tex.stackexchange.com/a/17555/4427 lists the parameters for the plain style, so it's easy to modify them.

\documentclass{article}
\usepackage{amsthm}

\usepackage{lipsum} % for mock text

\newtheoremstyle{plainindent}
  {\topsep}   % ABOVESPACE
  {\topsep}   % BELOWSPACE
  {\itshape}  % BODYFONT
  {\parindent}% INDENT (empty value is the same as 0pt)
  {\bfseries} % HEADFONT
  {.}         % HEADPUNCT
  {5pt plus 1pt minus 1pt} % HEADSPACE
  {}          % CUSTOM-HEAD-SPEC

\theoremstyle{plainindent}
\newtheorem{theorem}{Theorem}

\begin{document}

\lipsum[1][1-4]

\begin{theorem}
\lipsum[2][1-3]
\end{theorem}

\lipsum[3][1-4]

\end{document}

enter image description here

If you also use \theoremstyle{definition}, define a definitionindent style like plainindent, but with \upshape for BODYFONT.

Here's how you can also indent proofs.

\documentclass{article}
\usepackage{amsthm}
\usepackage{xpatch}

\usepackage{lipsum} % for mock text

\newtheoremstyle{plainindent}
  {\topsep}   % ABOVESPACE
  {\topsep}   % BELOWSPACE
  {\itshape}  % BODYFONT
  {\parindent}% INDENT (empty value is the same as 0pt)
  {\bfseries} % HEADFONT
  {.}         % HEADPUNCT
  {5pt plus 1pt minus 1pt} % HEADSPACE
  {}          % CUSTOM-HEAD-SPEC
\xpatchcmd{\proof}{\itshape}{\hspace{\parindent}\itshape}{}{}

\theoremstyle{plainindent}
\newtheorem{theorem}{Theorem}

\begin{document}

\lipsum[1][1-4]

\begin{theorem}
\lipsum[2][1-3]
\end{theorem}
\begin{proof}
\lipsum[2][4-6]
\end{proof}

\lipsum[3][1-4]

\end{document}

enter image description here

3
  • This works perfectly for my theorems and corollaries; however, it does not work for proofs that are defined as \newtheorem{proof}{Proof}. How could I indent proofs in a similar way?
    – Ron Snow
    Commented May 20, 2021 at 18:10
  • @CarlYocto Added the indentation for proofs.
    – egreg
    Commented May 20, 2021 at 19:13
  • Wonderful. Thank you!
    – Ron Snow
    Commented May 20, 2021 at 19:44
2

Not sure this is exactly what you want, but the ntheorem package defines a \theoremindent length:

\documentclass{article}
\usepackage{amsmath}%
usepackage{cite}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}

% for the journal
\usepackage[labelsep=period]{caption}
\captionsetup[table]{name=TABLE}
\renewcommand{\thetable}{\Roman{table}}
\usepackage{indentfirst}
\title{title}
\author{
    people
}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness}{0.2pt}
\usepackage{ntheorem}
\setlength{\theoremindent}{1cm}
\theoremseparator{.}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}

\theoremstyle{nonumberplain}
\theoremseparator{\upshape:}
\theoremheaderfont{\itshape}
\theorembodyfont{\normalfont}

\newtheorem{proof}{Proof}

\begin{document}
\maketitle

\begin{theorem}
A theorem to be indented at the label. And all its contents is indented indeed.
\end{theorem}

\begin{proof}
proof to be indented at the label. Blah blah blah. Blahblah. Blahblah.
\end{proof}

\end{document} 

enter image description here

Edit:To indent only the theorems and proofs labels, I defined two new styles: indented and nonumberindented:

\documentclass{article}
\usepackage{amsmath}%
\usepackage{cite}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}

% for the journal
\usepackage[labelsep=period]{caption}
\captionsetup[table]{name=TABLE}
\renewcommand{\thetable}{\Roman{table}}
\usepackage{indentfirst}
\title{title}
\author{
    people
}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness}{0.2pt}
\usepackage{ntheorem}
\usepackage{thmtools} 
\makeatletter
\newtheoremstyle{indented}%
{\item[\hskip\parindent \theorem@headerfont ##1\ ##2\theorem@separator]}%
 {\item[\hskip\parindent \theorem@headerfont ##1\ ##2\ (##3)\theorem@separator]}
 \newtheoremstyle{nonumberindented}%
{\item[\theorem@headerfont\hskip\parindent ##1\theorem@separator]}%
{\item[\theorem@headerfont\hskip\parindent ##1\ (##3)\theorem@separator]}
\makeatother
\theoremstyle{indented}
\theoremseparator{.}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}

\theoremstyle{nonumberindented}

\theoremseparator{\,\upshape:}
\theoremheaderfont{\itshape}
\theorembodyfont{\normalfont}

\newtheorem{proof}{Proof}

\begin{document}
\maketitle

\begin{theorem}
A theorem to be indented at the label. The theorem body is not indented .
\end{theorem}

\begin{proof}
proof to be indented only at the label. Blah blah blah. Blahblah. Blahblah.Blahblahblah. 
\end{proof}

\end{document} 

enter image description here

6
  • This worked great! Is there a way to have just the label be indented and the rest of the contents have standard spacing?
    – Ron Snow
    Commented May 20, 2021 at 17:29
  • 1
    That's the point for which I had a doubt. It should be possible adding the thmtools package. Let me test it first.
    – Bernard
    Commented May 20, 2021 at 17:32
  • Okay, thank you!
    – Ron Snow
    Commented May 20, 2021 at 18:04
  • 1
    @CarlYocto: Finally, thmtools was not necessary. I just defined two new styles, which add \parindent at the beginning. Please see if it's fine for you.
    – Bernard
    Commented May 20, 2021 at 18:13
  • @WillieWong: Thanks for the edit!
    – Bernard
    Commented May 20, 2021 at 18:48

You must log in to answer this question.

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