Replace (and print) \qedsymbol within ntheorem proofs

Viewed 213

I'm trying to use ntheorem to complete proofs, but having some problems because it has been not possible to replace the \qedsymbol after an enumerate group and at the end of an align* group, the \qed symbol has been not printed.

\documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{amssymb} % Conjunto de símbolos matemáticos
%\usepackage{amsthm}  % Formato para enunciados y demostraciones
\usepackage{amsmath}
\usepackage{enumitem}
%

\usepackage[amsthm,thmmarks]{ntheorem}
%\usepackage[standard]{ntheorem}
%
\qedsymbol{$\blacksquare$}
\renewcommand\qedsymbol{$\blacksquare$}
%
\begin{document}


\chapter*{Preface}
$\blacksquare$ \\
Lorem ipsum dolor sit amet, consectetur adipiscing elit
\begin{proof}
\begin{enumerate}
    \item item 1
    \item item 2
    \item item 3
\end{enumerate}
\end{proof}
%
%
\begin{proof}
\begin{align*}
    x+y &= z + k\\
    &= z + 2k
\end{align*}
\end{proof}
\end{document}

... Result has been enter image description here

1 Answers
  • You can change the qed symbol with \gdef\proofSymbol{\ensuremath{\blacksquare}}

  • as for the align environment: you are missing the amsmath option for the ntheorem package

\documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{amssymb} % Conjunto de símbolos matemáticos
%%\usepackage{amsthm}  % Formato para enunciados y demostraciones
\usepackage{amsmath}
\usepackage{enumitem}
%%

\usepackage[amsthm,thmmarks,amsmath]{ntheorem}

\gdef\proofSymbol{\ensuremath{\blacksquare}}

\begin{document}


\chapter*{Preface}
$\blacksquare$ \\
Lorem ipsum dolor sit amet, consectetur adipiscing elit
\begin{proof}
\begin{enumerate}
    \item item 1
    \item item 2
    \item item 3
\end{enumerate}
\end{proof}
%
%
\begin{proof}
\begin{align*}
    x+y &= z + k\\
    &= z + 2k
\end{align*}
\end{proof}
\end{document}

enter image description here

Related