0

I have a tex file:

\documentclass{article} \usepackage{amsthm,mathtools,amssymb,enumitem} \usepackage{zref-clever} \zcsetup{cap=true,comp=false,sort=false} \newcommand{\addtheorem}[2]{% \AddToHook{env/#1/begin}{% \zcsetup{countertype={theorem=#1}}% }% \zcRefTypeSetup{#1}{Name-sg=#2}% \newtheorem{#1}[theorem]{#2}% } \numberwithin{equation}{section} \theoremstyle{definition} \newtheorem{theorem}{Theorem}[section] \addtheorem{corollary}{Corollary} \addtheorem{lemma}{Lemma} \addtheorem{proposition}{Proposition} \addtheorem{definition}{Definition} \addtheorem{assumption}{Assumption} \addtheorem{remark}{Remark} \addtheorem{example}{Example} \let\oldproofname=\proofname \renewcommand{\proofname}{\rm\bf{\oldproofname}} \renewcommand\qedsymbol{$\blacksquare$} \usepackage{tcolorbox} \tcbuselibrary{skins,breakable} \tcbset{skin=enhanced, breakable, colframe=black, colback=white, boxrule=0.4pt} \ExplSyntaxOn \clist_map_inline:nn {theorem,corollary,lemma,proposition} {\tcolorboxenvironment{#1}{}} \ExplSyntaxOff \setlist[enumerate]{wide=\parindent} \setlist[enumerate,2]{labelindent=2\parindent} \begin{document} \section{Introduction} \begin{theorem} \label{thm} \begin{enumerate} \item Generally, it extends the idea of the derivative from realvalued functions of one real variable to functions on normed spaces. \item The Fréchet derivative should be contrasted to the more general Gateaux derivative which is a generalization of the classical directional derivative. \end{enumerate} \end{theorem} The proof of \zcref{thm} is \begin{proof} We have something. \end{proof} \end{document} 

enter image description here

Could you explain how to indent the head proof by \parindent? My desired output (taken from here) is

enter image description here

13
  • 1
    Please read tex.stackexchange.com/questions/516/… Commented Jul 29 at 8:56
  • 1
    As you already linked an answer to your question, I don't really understand your problem. You just need to replace amsthm by keytheorems and add the lines starting with \newkeytheoremstyle and \renewkeytheorem from the answer there … So IMHO this is a real duplicate. Commented Jul 29 at 8:57
  • 1
    How is changing the qed symbol related to the font and indentation of the header? Commented Jul 29 at 8:59
  • 1
    Please don't mix answers into your question. Edit your question to remove all already answered points. BTW: You should always try to focus on a single problem. Commented Jul 29 at 9:00
  • 1
    Then you should make this clear in your question (and also why you cannot use keytheorems). BTW: Using keytheorems is a kind of amsthm solution, because the package uses amsthm. Commented Jul 29 at 9:00

1 Answer 1

0

Below answer is adapted from a macro from this answer.

\documentclass{article} \usepackage{amsthm,mathtools,amssymb,enumitem} \usepackage{zref-clever} \zcsetup{cap=true,comp=false,sort=false} \newcommand{\addtheorem}[2]{% \AddToHook{env/#1/begin}{% \zcsetup{countertype={theorem=#1}}% }% \zcRefTypeSetup{#1}{Name-sg=#2}% \newtheorem{#1}[theorem]{#2}% } \numberwithin{equation}{section} \theoremstyle{definition} \newtheorem{theorem}{Theorem}[section] \addtheorem{corollary}{Corollary} \addtheorem{lemma}{Lemma} \addtheorem{proposition}{Proposition} \addtheorem{definition}{Definition} \addtheorem{assumption}{Assumption} \addtheorem{remark}{Remark} \addtheorem{example}{Example} \let\oldproofname=\proofname \renewcommand{\proofname}{\textup{\textbf{\oldproofname}}} \renewcommand\qedsymbol{$\blacksquare$} % Fix wrong jump to proof environment \makeatletter \renewenvironment{proof}[1][\proofname]{\par \pushQED{\qed}% \normalfont \topsep6\p@\@plus6\p@\relax \trivlist \itemindent\parindent \item[\MakeLinkTarget{}\hskip\labelsep \itshape #1\@addpunct{.}]\ignorespaces }{% \popQED\endtrivlist\@endpefalse } \makeatother \usepackage{tcolorbox} \tcbuselibrary{skins,breakable} \tcbset{skin=enhanced, breakable, colframe=black, colback=white, boxrule=0.4pt} \ExplSyntaxOn \clist_map_inline:nn {theorem,corollary,lemma,proposition} {\tcolorboxenvironment{#1}{}} \ExplSyntaxOff \setlist[enumerate]{wide=\parindent} \setlist[enumerate,2]{labelindent=2\parindent} \begin{document} \section{Introduction} \begin{theorem} \label{thm} \begin{enumerate} \item Generally, it extends the idea of the derivative from realvalued functions of one real variable to functions on normed spaces. \item The Fréchet derivative should be contrasted to the more general Gateaux derivative which is a generalization of the classical directional derivative. \end{enumerate} \end{theorem} The proof of \zcref{thm} is \begin{proof} We have something. \end{proof} \end{document} 

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.