2

When I use the following code,

\documentclass{amsbook}

\makeatletter
 \def\ps@spheadings{\ps@empty
  \def\@evenhead{\normalfont\scriptsize
  \rlap{\thepage}\hfil \leftmark{}{}}%
  \def\@oddhead{\normalfont\scriptsize
  \rightmark{}{}\hfil \llap{\thepage}}%
  \let\@mkboth\markboth
  \def\partmark{\@secmark\markboth\partrunhead\partname}%
  \def\chaptermark{%
    \@secmark\markboth\chapterrunhead{}}%
  \def\sectionmark{%
    \@secmark\markright\sectionrunhead\sectionname}%
}
\def\th@spplain{%
  \let\thm@indent\relax
  \thm@headfont{\bfseries}% heading font bold face
  \let\thmhead\thmhead@plain \let\swappedhead\swappedhead@plain
  \thm@preskip.5\baselineskip\@plus.2\baselineskip
                                \@minus.2\baselineskip
  \thm@postskip\thm@preskip
  \normalfont
}
\makeatother

\theoremstyle{spplain}
\newtheorem{theo}{Theorem}

\pagestyle{spheadings}

\begin{document}

\chapter{A test chapter}
\section{A test section}
$\\$Beginning Text.
\begin{theo}
Some Text
\end{theo}
Ending Text.
\end{document}

I get the following output, enter image description here

but I want to have an output in which the followings hold,

  1. The "E" "Ending Text" should be along the same vertical line as "B" of "Beginning Text".
  2. The space between "Theorem 1" and "Beginning Text" should be equal to that of "Theorem 1" and "Ending Text".

How can I modify the above code (or produce a different code) to meet this criteria?

3

Add

\def\@endtheorem{\endtrivlist\@endpetrue }

before \makeatother would suffice, it automatically suppresses paragraph indentation. Alternatively, you can simply add \noindent after every \end{theo}.

The vertical space (between baseline) before and after Theorem 1. should already be equal, since you have set

\thm@postskip\thm@preskip

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.