
Usei o pacote thmtools para criar um novo ambiente de prova. Com o código a seguir recuei todo o ambiente:
\AtBeginEnvironment{prf}{
\patchcmd\@thm{\trivlist}{\list{}{\leftmargin25pt}}{}{}
\patchcmd\thmt@original@endprf{\endtrivlist}{\endlist}{}{}
}
O problema agora é que quando tenho vários parágrafos dentro deste ambiente, o recuo do parágrafo não fica mais visível ( \setlength{\parindent}{25pt}
). Como eu poderia resolver esse problema?
Desde já, obrigado.
Isso deve demonstrar o problema:
\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}
Responder1
Basta restabelecer o recuo do parágrafo, definindo o \listparindent
parâmetro:
\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}
Responder2
O ntheorem
pacote é compatível thmtools
e já define um arquivo \theoremindent
. No exemplo a seguir, de um arquivo antigo meu, eu configurei \theoremindent{1cm}
e, como você pode ver, dentro do ambiente de prova, o recuo do parágrafo é preservado: