% This is a package for rendering PlanetMath entries at home
%
% In order for this package to render hyperlinks to PlanetMath
% one of the following packages has to be loaded _before_
% this package: html, hyperref, url.
% This package is distributed under General Public License
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{pmath}[2004/02/21 v0.1]

\@ifundefined{htmladdnormallink}
{\@ifundefined{href}{%
 \@ifundefined{url}{%
  \newcommand*{\pmathhref}[2]{#2}}
  {\newcommand*{\pmathhref}[2]{#2\footnote{For ``#2'' see #1.}}}
}{\newcommand*{\pmathhref}{\href}}}{\newcommand*{\pmathhref}[2]{\htmladdnormallink{#2}{#1}}}

\newcommand*{\PMlinkexternal}[2]{\pmathhref{#2}{#1}}
\newcommand*{\PMlinkname}[2]{\pmathhref{http://planetmath.org/encyclopedia/#2.html}{#1}}
\newcommand*{\PMlinkid}[2]{\pmathhref{http://planetmath.org/encyclopedia/#2.html}{#1}}
%\newcommand*{\PMlinkid}[2]{\pmathhref{http://planetmath.org/?op=getobj&from=objects&id=#2}{#1}}
\newcommand{\PMlinkescapetext}{ }
\newcommand*{\PMlinkescapeword}[1]{}
\newcommand*{\PMlinkescapephrase}[1]{}
\newcommand*{\PMlinktofile}[2]{#1} % not implemented

\endinput
