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}

Paul Gessler
  • 29,607
Ron Snow
  • 123
  • 1
    You mean normal indented paragraphs or should the body of the theorem be indented as well? – egreg May 20 '21 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 May 20 '21 at 17:30

2 Answers2

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

egreg
  • 1,121,712
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

Willie Wong
  • 24,733
  • 8
  • 74
  • 106
Bernard
  • 271,350