0

Here is my document from the beginning:

\documentclass{book}
\usepackage[margin=1in]{geometry}
\usepackage{datetime2}
\usepackage{lipsum}

\DTMsetstyle{mmddyy}
\DTMsetup{datesep=/}

\usepackage{fancyhdr}
\fancyhead[L]{\sffamily Jack}
\fancyhead[C]{\bfseries RAT : Homework 4}
\fancyhead[R]{\today}
\pagestyle{fancy}

\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\newtcbtheorem[auto counter, number within=section]{problem}{Problem}{
    fonttitle=\bfseries,
    colframe=black,
    coltitle=black,
    colback=black!10,
    colbacktitle=black!10,
    boxrule=.4pt,
    attach title to upper=\newline,
    sharp corners,
    top=1mm, bottom=1mm,
    left=2mm, right=2mm,
}{}
\newtheorem{pro}{\emph{Proof}}
\begin{document}

%\begin{center}
   % \sffamily
    %Title
%\end{center}

\setcounter{chapter}{7}
\setcounter{section}{2}
\begin{problem}[phantom=\setcounter{\tcbcounter}{13}]{}{}
\lipsum[1]
\end{problem}

\begin{pro}


\end{pro}

\end{document}

But I am wondering how can I stop numbering the word proof in my document and to put the square at the end of my proofs?

Any help will be greatly appreciated!

EDIT:

Here is how my document looks like now:

enter image description here

1

You may use add these two lines before this line \newtheorem{pro}{\emph{Proof}} in your code to serve your purpose.

\usepackage{ntheorem}
\theoremstyle{nonumberplain}

EDIT:

Another solution can be proposed:

\usepackage{amssymb}
\usepackage[thmmarks]{ntheorem}
\theoremheaderfont{\bfseries}
\theorembodyfont{\normalfont}
\theoremsymbol{$\blacksquare$} 
\newtheorem*{pro}{\emph{Proof}}
3
  • what about the square at the end of each proof?
    – Happy
    Oct 31 '21 at 4:37
  • @Happy I have edited the answer with the solution of the square at the end of each proof.
    – topu
    Oct 31 '21 at 9:03
  • it did not gave me any square at the end unfortunately
    – Happy
    Nov 6 '21 at 23:12
1

If you load the amsthm package it will give you a proof environment that will do what you want (although there are some special cases, such as when your proof ends with a displayed equation or a list where you will need to use \qedhere to produce the proof box at the correct location.

1
  • It did not ... amsthm
    – Happy
    Oct 31 '21 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.