отступ абзаца внутри отступа

отступ абзаца внутри отступа

Я использовал thmtools-package для создания новой среды доказательства. С помощью следующего кода я сделал отступ для всей среды:

\AtBeginEnvironment{prf}{
  \patchcmd\@thm{\trivlist}{\list{}{\leftmargin25pt}}{}{}
  \patchcmd\thmt@original@endprf{\endtrivlist}{\endlist}{}{}
}

Проблема в том, что теперь, когда у меня есть несколько абзацев внутри этой среды, отступ абзаца больше не виден ( \setlength{\parindent}{25pt}). Как я могу исправить эту проблему?

Заранее спасибо.


Это должно продемонстрировать проблему:

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

\declaretheoremstyle[
    spaceabove=\topsep,
    spacebelow=\topsep,
    headformat={\NAME},
    headfont=\bfseries,
    notefont=\normalfont,
    bodyfont=\normalfont,
    headindent=0pt,
    headpunct={\ },
    qed =\qedsymbol
]{proof}
\declaretheorem[style=proof,name=Proof,numbered=no]{prf}

\makeatletter
\AtBeginEnvironment{prf}{%
  \patchcmd\@thm{\trivlist}{\list{}{\leftmargin25pt}}{}{}
  \patchcmd\thmt@original@endprf{\endtrivlist}{\endlist}{}{}
}
\makeatother

\setlength{\parindent}{25pt}


\begin{document}
\section{Section}
Some text\\
And more text

Here the paragraph is indented.

\begin{prf}
Some text\\
And more text

Here the paragraph is not (visibly) indented.
\end{prf}

\end{document}

решение1

Просто восстановите отступ абзаца, установив \listparindentпараметр:

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

\declaretheoremstyle[
    spaceabove=\topsep,
    spacebelow=\topsep,
    headformat={\NAME},
    headfont=\bfseries,
    notefont=\normalfont,
    bodyfont=\normalfont,
    headindent=0pt,
    headpunct={\ },
    qed =\qedsymbol
]{proof}
\declaretheorem[style=proof,name=Proof,numbered=no]{prf}

\makeatletter
\AtBeginEnvironment{prf}{%
  \patchcmd\@thm{\trivlist}{\list{}{\leftmargin25pt\listparindent\parindent}}{}{}
  \patchcmd\thmt@original@endprf{\endtrivlist}{\endlist}{}{}
}
\makeatother

\setlength{\parindent}{25pt}


\begin{document}
\section{Section}
Some text\\
And more text

Here the paragraph is indented.

\begin{prf}
Some text\\
And more text

Here the paragraph is indented.
\end{prf}

\end{document}

введите описание изображения здесь

решение2

Пакет ntheoremсовместим с thmtoolsи уже определяет \theoremindent. В следующем примере из моего старого файла я установил \theoremindent{1cm}и, как вы можете видеть, внутри среды проверки отступ абзаца сохраняется:

введите описание изображения здесь

Связанный контент