I wish to design a document with the following mock-up layout, where theorems are separated from the main body of the text in a sort of margin:
\documentclass[11pt,a4paper]{article}
\usepackage{xcolor}
\usepackage[calcwidth]{titlesec}
\usepackage{tikz}
\usepackage{pgfplots} \pgfplotsset{compat=1.12}
%Underlining ruler for subsections
\titleformat{\section}%
{\normalfont\Large\bfseries}% format
{}% label
{0mm}% sep
{%
\vadjust pre{%
\color{gray}%
\hrule width \linewidth height 0.5pt\relax
}%
}% before-code
\begin{document}
\section{Example Section}
\end{document}
How do I achieve this?


ntheorem: a\theoremindentlength is defined, which is 0 by default. Other suggestion: the same package defines amargintheorem style. – Bernard Dec 02 '17 at 17:19