# changing font style/size for proof, adding a square after example

Is is possible to change font size/(or style) for a proof? I was also thinking to add a small hollow square at the end of every example to separate the text a little. Something similar that works like \qedhere symbol.

\documentclass[11pt,a5paperfootinclude=true,headinclude=true]{scrbook} % KOMA-Script book
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage[bitstream-charter]{mathdesign}
%\usepackage[osf]{libertine}
\titleformat{\section}
{\normalfont\bfseries}{\thesection}{1em}{}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{IEEEtrantools}
\usepackage{anysize}
\usepackage{stmaryrd}
\usepackage{bbding}
\usepackage{chngcntr}%added to reset footnote for each chapter
\counterwithout{footnote}{chapter}%added to reste footnote for each chapter
\marginsize{0.1\paperwidth}{0.1\paperheight}{2cm}{2cm}
\newcommand{\bigslant}[2]{{\raisebox{.2em}{$#1$}\left/\raisebox{-.2em}{$#2$}\right.}}
\usepackage{enumerate}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers
\newtheorem{exmp}[thm]{Example}
\theoremstyle{corollary}
\newtheorem{cor}[thm]{Corollary}
\theoremstyle{lemma}
\newtheorem{lem}[thm]{Lemma}
\theoremstyle{proposition}
\newtheorem{prop}[thm]{Proposition}
\newcommand{\ndiv}{\hspace{-4pt}\not|\hspace{2pt}}
\DeclareMathOperator{\disc}{disc}
%\renewcommand{\qedsymbol}{\rule{0.7em}{0.7em}}
\renewcommand\qedsymbol{\RectangleBold}
\def\quotient#1#2{%
\raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}%
}
\DeclareMathOperator{\order}{\mathcal{O}_{K}} %defined myself
\DeclareMathOperator{\z}{\mathbb{Z}} %defined myself
\DeclareMathOperator{\q}{\mathbb{Q}} %defined myself
\DeclareMathOperator{\C}{\mathbb{C}} %defined myself
\begin{document}
\begin{proof}
This is my proof
\end{proof}
\begin{exmp}
Want a hollow square at the end of this example.
\end{exmp}
\end{document}


Which produces

• Thank you Barbara, I managed to fixed the symbol by using one of these answers. Do you have any idea how to can I change the size of the font (or the style) just for proofs? Thank you. – user124471 Jun 6 '14 at 16:30
• you're using some theorem styles that i'm not familiar with, and i know know where the solid tombstone came from, so this is just "blue sky". since proof defines a "contained" environment, any font you reset within it will "go away" when you leave the environment. so you could use (for example) \small or \large or \itshape locally within the environment. you would have to use the optional proof name to match. – barbara beeton Jun 6 '14 at 16:50

It's easy with thmtools:

\documentclass[
11pt,
%  a5paper,% really?
footinclude=true,
]{scrbook} % KOMA-Script book

\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{bbding}
\usepackage{amsthm}
\usepackage{thmtools}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers

\declaretheoremstyle[
style=definition,
qed=\openbox,
]{example}
\declaretheorem[
name=Example,
style=example,
numberlike=thm,
]{exmp}

\renewcommand\qedsymbol{\RectangleBold}

\begin{document}
\begin{proof}
This is my proof
\end{proof}
\begin{exmp}
Want a hollow square at the end of this example.
\end{exmp}
\end{document}


I have removed the inessential parts of the preamble. Note that there is no lemma, corollary or proposition theorem style. A full specification with thmtools would be

\documentclass[
11pt,
%  a5paper,% really?
footinclude=true,
]{scrbook} % KOMA-Script book

\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{bbding}
\usepackage{amsthm}
\usepackage{thmtools}

\declaretheorem[
style=plain,
name=Theorem,
within=chapter,
]{thm}
\declaretheorem[
style=plain,
name=Lemma,
numberlike=thm,
]{lem}
\declaretheorem[
style=plain,
name=Proposition,
numberlike=thm,
]{prop}
\declaretheorem[
style=plain,
name=Corollary,
numberlike=thm,
]{cor}

\theoremstyle{definition}
\declaretheorem[
style=definition,
name=Definition,
numberlike=thm,
]{defn}

\declaretheoremstyle[
style=definition,
qed=\openbox,
]{example}
\declaretheorem[
name=Example,
style=example,
numberlike=thm,
]{exmp}

\renewcommand\qedsymbol{\RectangleBold}

\begin{document}
\chapter{Title}
\begin{prop}
A proposition.
\end{prop}
\begin{lem}
A lemma.
\end{lem}
\begin{thm}
A theorem.
\end{thm}
\begin{proof}
This is my proof
\end{proof}
\begin{cor}
A corollary.
\end{cor}
\begin{exmp}
Want a hollow square at the end of this example.
\end{exmp}
\end{document}


• Thank you egreg, this is exactly what I am after but somehow the code you have suggested does not want to work with the rest of my text, I just get a bunch of errors....especially with newly declared math operators – user124471 Jun 7 '14 at 15:58
• @user124471 I used only the package necessary for the example; for \DeclareMathOperator you need amsmath. – egreg Jun 7 '14 at 16:01

As an example environment I use (something like) the following:

\newenvironment{Example}[1][\relax]%
{\refstepcounter{equation}\trivlist
\ifx#1\relax
\item[\hskip\labelsep\theequation.~\textbf{Example}\space]
\else
\item[\hskip\labelsep\theequation.~\textbf{Example }(#1)\space]
\fi
\ignorespaces
}{\unskip\nobreak\hfil%
\penalty50\hskip2em\hbox{}\nobreak\hfil$\diamondsuit$%
\parfillskip=0pt\finalhyphendemerits=0\penalty-100\endtrivlist%
}


If you wanted to change the font etc used in the proof environment then you can hijack it with something like this:

\newenvironment{Proof}[1][Proof]{\proof[#1]\large\itshape}{\endproof}


Now the proof is written in a large italic font.