2

I would like to be able to recreate the following theorem style, where the main body of a theorem/proof/definition etc. is indented by a variable amount. I would also like to end a theorem proof with a filled circle rather than a square. The labels "Definition 1.1., etc." should be vertically aligned with the first line of the definition text. How do I go about achieving this?

As a starting point, I am working with the following document.

\documentclass[11pt,a4paper]{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage{xcolor}
\usepackage[calcwidth]{titlesec}
\usepackage{blindtext}
\usepackage{scrextend}
\usepackage{microtype}
\usepackage[leqno]{amsmath}
\usepackage[standard,amsmath,thmmarks]{ntheorem} 
\usepackage{etoolbox}
\makeatletter
\setlength \labelsep {3.15em} 
\newtheoremstyle{mymargin}%
{\item[\theorem@headerfont \llap{##1 ##2}]}%
{\item[\theorem@headerfont \llap{##1 ##2}| ##3\theorem@separator\hskip\labelsep]}%
\makeatother


% my definition
\theoremstyle{mymargin}
\theorembodyfont{}   
\theoremsymbol{}
\theoremprework{}
\theorempostwork{}
\theoremseparator{.}
\newtheorem{mydefinition}{Definition}
\numberwithin{mydefinition}{section}
\newtheorem{mythm}{Theorem}
\numberwithin{mythm}{section}

\begin{document}

\section{A test section}
\begin{addmargin}[10em]{0em}\begin{mydefinition}\blindtext\end{mydefinition}
\end{addmargin}

\end{document}

enter image description here

3

I don't like ntheorem. Here's a modification of https://tex.stackexchange.com/a/106582/4427

\documentclass[a4paper]{article}
\usepackage{amsthm,thmtools}
\usepackage{etoolbox}

\usepackage{lipsum} % just for context
\usepackage{showframe} % for showing the margins

\makeatletter
\newlength{\thmindent}
\AtBeginDocument{\setlength{\thmindent}{15em}}
\patchcmd\@thm
  {\trivlist}
  {\list{}{\leftmargin\thmindent}}
  {}{}
\newcommand{\xdeclaretheorem}[2][]{%
  \declaretheorem[#1]{#2}%
  \expandafter\patchcmd\csname thmt@original@end#2\endcsname
    {\endtrivlist}{\endlist}{}{}%
}

\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont 
  \list{}{\leftmargin=\thmindent}
  \item
  \makebox[0pt][r]{\makebox[\thmindent][l]{\itshape#1\@addpunct{.}}}\ignorespaces
}{%
  \popQED\endlist\@endpefalse
}
\renewcommand{\qedsymbol}{\textbullet}
\makeatother


\declaretheoremstyle[
  headpunct={},
  headfont=\bfseries,
  bodyfont=\normalfont,
  headindent=0pt,
  postheadspace=0pt,
  headformat={\makebox[0pt][r]{\makebox[\thmindent][l]{\NAME\ \NUMBER.}}},
]{INDENTthm}

\xdeclaretheorem[
  within=section,
  style=INDENTthm,
  name=Theorem
]{thm}

\xdeclaretheorem[
  sibling=thm,
  style=INDENTthm,
  name=Lemma
]{lem}

\begin{document}

\begin{thm}
\lipsum*[2]
\begin{enumerate}
\item a
\item b
\end{enumerate}
\end{thm}

\begin{lem}
\lipsum*[2]
\begin{enumerate}
\item a
\item b
\end{enumerate}
\end{lem}

\begin{proof}
\lipsum*[2]
\end{proof}

\end{document}

enter image description here

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.