0

I would like to use a theorem-like environment inside a quote environment (or with the same spacing as a quote environment).

In this answer the following solution is presented:

\documentclass{article}
\usepackage{amsthm}
\usepackage{lipsum}

\theoremstyle{definition}
\newtheorem{theo}{Theorem}
\newenvironment{Qtheorem}[1][]
  {\quote\begin{theo}[#1]}
  {\end{theo}\endquote}

\begin{document}

\lipsum[1]
\begin{Qtheorem}
\lipsum[1]
\end{Qtheorem}
\lipsum[1]

\end{document}

However, it produces extra/unwanted space at the top of the environment:

enter image description here

Can this be fixed directly?

2

1 Answer 1

0

You could define your own style:

\documentclass{article}
\usepackage{amsthm}
\usepackage{lipsum}

\newtheoremstyle{mystyle}%
{0pt}%space above
{0pt}%space below
{}% body font
{}% paragraph indent amount
{\bfseries}% head font
{.}% punctuation after head
{.5em}% space after head
{}% headspec

\theoremstyle{mystyle}
\newtheorem{theo}{Theorem}
\newenvironment{Qtheorem}[1][]
  {\quote\begin{theo}[#1]}
  {\end{theo}\endquote}

\begin{document}

\lipsum[1]
\begin{Qtheorem}
\lipsum[1]
\end{Qtheorem}
\lipsum[1]

\end{document}
1
  • It looks like I shouldn't, but for some reason I get the same amount of space with your example as in the picture in the question.
    – Earthliŋ
    Mar 7, 2022 at 22:45

Not the answer you're looking for? Browse other questions tagged .