\documentclass{article}

\usepackage{pf}
\usepackage{html}
\usepackage{graphicx}

% 20020423 wsi: \myincludegraphics{base name of file}{arguments like width=10cm}
% a gif version of the graphic file must be placed in the base directory created 
% by latex2html
% works also with pdflatex (uses png or pdf file, whichever and standard latex
\newcommand{\myincludegraphics}[2]{\latexhtml{\includegraphics[#2]{#1}}{\htmladdimg{#1.gif}}}

\usepackage{hyperref}

%begin{latexonly}
\renewcommand{\htmladdnormallink}[2]{\href{#2}{#1}}
\newcommand{\lbn}{\linebreak[0]}
%end{latexonly}
\begin{htmlonly}
\newcommand{\lbn}{}
\end{htmlonly}

\pfshortnumbers{20}
%\pfhidelevel{}

\renewcommand{\qed}{{\kwfont Q.E.D.}}

\begin{document}

\title{A visual proof of the Pythagorean theorem}

\author{Wolfgang Slany\\
\htmladdnormallink{http://slany.org/wolfgang/}{http://slany.org/wolfgang/}\\
\htmladdnormallink{http://www.dbai.tuwien.ac.at/proj/pf2html/}{http://www.dbai.tuwien.ac.at/proj/pf2html/}}
\date{April 25, 2002}

\maketitle

\noindent Theorem (\cite{Choupeisuanching}): The area of the square built upon the hypotenuse of a right
triangle is equal to the sum of the areas of the squares upon the
remaining sides. Stated algebraically, for a right triangle with sides
of lengths $a$, $b$, and $c$, where $c$ is the length of the
hypotenuse, \[a^2 +b^2 = c^2\;.\]

\noindent For example, the area of the square labeled $c^2$ in the following
figure is equal to the sum of the areas of the squares labeled $a^2$ and $b^2$.
\begin{center}\myincludegraphics{pythagoras1}{width=.8\textwidth}\end{center}

Proof:
\begin{proof}
\begin{center}\myincludegraphics{pythagoras2}{width=.8\textwidth}\end{center}
A more detailed proof:
 \begin{proof}
 \begin{center}\myincludegraphics{pythagoras3}{width=.8\textwidth}\end{center}
 A more detailed proof:
     \begin{proof}
     \begin{center}\myincludegraphics{pythagoras4}{width=.8\textwidth}\end{center}
     A more detailed proof:
       \begin{proof}
       \begin{center}\myincludegraphics{pythagoras5}{width=.8\textwidth}\end{center}
       A more detailed proof:
         \begin{proof}
         \begin{center}\myincludegraphics{pythagoras6}{width=.8\textwidth}\end{center}
         A more detailed proof:
           \begin{proof}
           \begin{center}\myincludegraphics{pythagoras7}{width=.8\textwidth}\end{center}
           \begin{center}\myincludegraphics{pythagoras8}{width=.8\textwidth}\end{center}
           A more detailed proof:
             \begin{proof}
             See \htmladdnormallink{http://whyslopes.com/etc/ThreeSkillsForAlgebra/ch17.html}{http://whyslopes.com/etc/ThreeSkillsForAlgebra/ch17.html}.
             \end{proof}
    	   \end{proof}
        \end{proof}
       \end{proof}
     \end{proof}
 \end{proof}
\end{proof}

\begin{thebibliography}{}

\bibitem{Choupeisuanching} Chou pei suan ching: The
Arithmetical Classic of the Gnomon and the Circular Paths of Heaven, a
Chinese astronomical and mathematical treatise. Exact date of origin
unknown
\htmladdnormallink{http://www.google.com/search?q=chou+pei+suan+ching}{http://www.google.com/search?q=chou+pei+suan+ching}.

\end{thebibliography}

\end{document}