# Displaymode-like theorem environment

I am having trouble recreating this theorem environment. I want to create an environment that is essentially on its own line, much like a block quote.

The only code I have so far just makes the this specific environment that is pictured

\newtheorem*{theorem}{Theorem}
\newtheoremstyle{named}{}{}{\itshape}{}{\normalfont\scshape}{.}{.5em}{\thmnote{#3}#1}
\theoremstyle{named}
\newtheorem*{namedtheorem}{}


• Welcome to TeX SX! Could you post a compilable code? – Bernard Feb 13 at 20:33

You need no special \newtheorem declaration:

\documentclass{article}
\usepackage{amsmath}

\usepackage{lipsum} % for context

\newenvironment{namedtheorem}[1]
{\begin{quotation}\noindent\textsc{#1.} \itshape\ignorespaces}
{\end{quotation}}

\begin{document}

\lipsum[1][1-5]

\begin{namedtheorem}{Scale-Invariance}
For any distance function $d$ and any $\alpha>0$,
we have $f(d)=f(\alpha\cdot d)$.
\end{namedtheorem}

\lipsum[4]

\end{document}


A more customizable version:

\documentclass{article}
\usepackage{amsmath,amsthm,microtype}

\usepackage{lipsum} % for context

\newtheoremstyle{personal}
{\topsep}   % ABOVESPACE
{\topsep}   % BELOWSPACE
{\itshape}  % BODYFONT
{0pt}       % INDENT (empty value is the same as 0pt)
{5pt plus 1pt minus 1pt} % HEADSPACE
\theoremstyle{personal}

\newtheorem*{namedtheoreminner}{\namedtheoremname}
\newenvironment{namedtheorem}[1]
\dimen0=\parindent
\centering\begin{minipage}{\dimexpr\textwidth-2\dimen0\relax}
\parindent=\dimen0
\newcommand\namedtheoremname{#1}%
\begin{namedtheoreminner}}
{\end{namedtheoreminner}\end{minipage}\par

\begin{document}

\lipsum[1][1-5]

\begin{namedtheorem}{Scale-Invariance}
For any distance function $d$ and any $\alpha>0$,
we have $f(d)=f(\alpha\cdot d)$.
\end{namedtheorem}

\lipsum[4]

\end{document}