2

I am using the follwoing code to write proofs in the elsarticle class. (This is exactly the code suggested in the documentation.)

\documentclass{elsarticle}

\journal{Journal of \LaTeX\ Templates}

\newproof{pf}{Proof}
    
\begin{document}

\begin{pf}
Some proof.
\end{pf}

\end{document}

However, there's no square at the end of the proof! (Additionally, I think the word proof should be in bold, which is not the case.) Is there a problem with the class? Or am I doing something wrong?

2
  • 1
    Try using \qed? Dec 16, 2021 at 12:06
  • I guess this does work, but the documentation makes it seem like I shouldn't have to use an extra command...
    – JeCl
    Dec 16, 2021 at 12:17

1 Answer 1

1

The newly defined pf environment makes no attempt whatsoever to automatically add a QED tombstone.

You might manually add \qed at the end, but its definition is very simplistic and would need work.

However, the documentation of elsarticle says

Users can also make use of amsthm.sty which will override all the default definitions described above.

Do it and use the provided proof environment.

By the way, the class has

\def\@opargbeginproof#1#2#3{\trivlist\let\baselinestretch\@blstr
      \item[\hskip \labelsep{\scshape #1\ (#3).}]\rmfamily}

so the label is in small caps by choice (contrary to what the documentation shows).

If you want the “Proof” label in boldface when using amsthm, you can patch it.

\documentclass{elsarticle}
\usepackage{amsthm}
\usepackage{xpatch}

\xpatchcmd{\proof}{\itshape}{\prooflabelfont}{}{}
\newcommand{\prooflabelfont}{\bfseries}

\journal{Journal of \LaTeX\ Templates}


\begin{document}

\begin{proof}
Some proof.
\end{proof}

\end{document}

enter image description here

You must log in to answer this question.

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