1

I wonder if it's possible to make the QED symbol in the proof environment clickable, to redirect to some given website. Concretely, the syntax would be something like this:

\begin{proof}[Sketch of the Proof.][url="..."]
.
.
.
\end{proof}
Bernard
  • 271,350

1 Answers1

3

Here's one way of doing it with amsthm's proof environment:

\documentclass{article}
\usepackage{hyperref}  % For links, provides \href
\usepackage{amsthm}  % For proof environment
\usepackage{amssymb}  % For \square symbol
\begin{document}
\begin{proof}
    \renewcommand{\qedsymbol}{\href{https://tex.stackexchange.com/}{\(\square\)}}
    Test
\end{proof}
\end{document}

You can then create your own environment that is defined in a similar way:

\newenvironment{linkproof}[2][]{%
    \begin{proof}[#1]
    \renewcommand{\qedsymbol}{\href{#2}{\(\square\)}}
}{%
    \end{proof}
    \renewcommand{\qedsymbol}{\(\square\)}
}

Which is then used as

\begin{linkproof}[ABC]{www.google.com}
    Test
\end{linkproof}

You could also edit the definition of proof so it has this behaviour as well.

Willoughby
  • 3,649