4

When I design my iff-proof as follows, I get this warning:

The \qedhere command may not work correctly here

Is there any way to fix this warning, since the result looks fine, or accomplish this formatting another way? [Edit: I’d like to have the qed-square at the same height as the second "Wohoo."]

Looks fine

This is a small working example which assures the style above:

\documentclass[a4paper]{report}

\usepackage{mathtools}
\usepackage{csquotes}
\usepackage{amsthm}
\usepackage{enumitem}
\setdescription{font=\normalfont\itshape}

\begin{document}
\begin{proof}$ $\par
\begin{description}[topsep=0pt]
    \item[\enquote{$\Rightarrow$}] This is one direction of the proof. It might include some formulas. Something along the lines of $a^2+b^2=c^2$. Wohoo.

    \item[\enquote{$\Leftarrow$}] This is the other direction of the proof. It might include some formulas. Something along the lines of $a^2+b^2=c^2$. Wohoo.$\hfill\qedhere$
\end{description}
\end{proof}
Some follow up text. And more of it. And more of it. Let's make it two lines of follow up text for some reason.

\end{document}

Thanks!

1
  • 1
    Welcome to TeX.SX!
    – egreg
    Oct 7 '18 at 21:48
4

You're misusing \qedhere. It should be simply that, not $\hfill\qedhere$.

\documentclass[a4paper]{report}

\usepackage{mathtools}
\usepackage{csquotes}
\usepackage{amsthm}
\usepackage{enumitem}
\setdescription{font=\normalfont\itshape}

\begin{document}
\begin{proof}\mbox{}
\begin{itemize}[topsep=0pt]
\item[\enquote{$\Rightarrow$}] This is one direction of the proof.
It might include some formulas. Something along the lines
of $a^2+b^2=c^2$. Wohoo.

\item[\enquote{$\Leftarrow$}] This is the other direction of the proof.
It might include some formulas. Something along the lines of $a^2+b^2=c^2$.
Wohoo.\qedhere
\end{itemize}
\end{proof}

Some follow up text. And more of it. And more of it. Let's make it two
lines of follow up text for some reason.

\end{document}

enter image description here

By the way, instead of $ $\par, just type \mbox{}. I used itemize, because the italic quotes around the arrows are just awful.

I find it better style to just use plain paragraphs, instead of itemized proofs.

\documentclass[a4paper]{report}

\usepackage{mathtools}
\usepackage{csquotes}
\usepackage{amsthm}
\usepackage{enumitem}

\begin{document}
\begin{proof}
\enquote{$\Rightarrow$} This is one direction of the proof.
It might include some formulas. Something along the lines
of $a^2+b^2=c^2$. Wohoo.

\enquote{$\Leftarrow$} This is the other direction of the proof.
It might include some formulas. Something along the lines of $a^2+b^2=c^2$.
Wohoo.
\end{proof}

Some follow up text. And more of it. And more of it. Let's make it two
lines of follow up text for some reason.

\end{document}

enter image description here

Just as clear, even better, in my opinion.

1

Just place \qedhere after proof environment:

\documentclass[a4paper]{report}

\usepackage{mathtools}
\usepackage{csquotes}
\usepackage{amsthm}
\usepackage{enumitem}
\setdescription{font=\normalfont\itshape}

\begin{document}
\begin{proof}$ $\par
\begin{description}[topsep=0pt]
    \item[\enquote{$\Rightarrow$}] This is one direction of the proof. It might include some formulas. Something along the lines of $a^2+b^2=c^2$. Wohoo.

    \item[\enquote{$\Leftarrow$}] This is the other direction of the proof. It might include some formulas. Something along the lines of $a^2+b^2=c^2$. Wohoo.
\end{description}
\end{proof}
$\hfill\qedhere$
Some follow up text. And more of it. And more of it. Let’s make it two lines of follow up text for some reason.

\end{document}

If you do not want to place \qed everytime you use the proof environment you can redefine it writting in preamble:

\let\Oldproof\proof
\renewenvironment{proof}{\begin{Oldproof}}{\end{Oldproof}$\hfill\qed$}

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.