3

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. enter image description here

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}{}

enter image description here

| improve this question | | | | |
  • 1
    Welcome to TeX SX! Could you post a compilable code? – Bernard Feb 13 '19 at 20:33
1

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}

enter image description here

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)
  {\scshape}  % HEADFONT
  {.}         % HEADPUNCT
  {5pt plus 1pt minus 1pt} % HEADSPACE
  {\thmname{{\lsstyle#1}}\thmnote{ (#3)}} % CUSTOM-HEAD-SPEC
\theoremstyle{personal}

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

\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}

enter image description here

| improve this answer | | | | |

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.