# Mathtools package won't work with my document class

I'd like to put in mathtools, specifically so that I can use the multilined environment. But it doesn't seem to want to work with the document class I'm using. (The amspset document class can be found here.)

\documentclass[reqno, 11pt, letterpaper, cm, unboxed]{amspset}
\usepackage{amsthm, amssymb, amsfonts}
\usepackage{mathtools}
\usepackage[in]{fullpage}

\name{Eric Auld}
\class{MATH 2200}
\assignment{Homework 1}
\duedate{April, 10}

\begin{document}

\begin{solution}{\textbf{1.} }

\end{solution}

\end{document}


This keeps resulting in an error (saying "ifpdf is already defineed"), and the culprit is mathtools. Any ideas?

This relatively uncommon document class seems to have some problems, so if anyone has a better suggestion (maybe just amsart) for homework assignments, I am open to it.

Edit: I tried \let\ifpdf\relax and ran into some problems

\documentclass[reqno, 11pt, letterpaper, cm, unboxed]{amspset}
\usepackage{amsthm, amssymb, amsfonts}
\usepackage[in]{fullpage}
\let\ifpdf\relax
\usepackage{mathtools}

% info for header block in upper right hand corner
\name{Eric Auld}
\class{MATH 2200}
\assignment{Homework 1}
\duedate{April, 10}

\begin{document}

\begin{solution}{\textbf{1.} }
\begin{align*}
\!\begin{multilined}[t]
e=mc^2
\end{multilined}
\end{align*}

\end{solution}

\end{document}


It doesn't seem to know the multilined environment.

-
The amspset class defines (wrongly) \ifpdf. –  egreg Sep 26 '13 at 9:57
@egreg Thank you. Do you have a suggestion for formatting a homework assignment? –  Eric Auld Sep 26 '13 at 10:02

The amspset class starts off with

%%% INITIAL CODE ----------------------------------------------------------
%% Flag for compilation to PDF
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse
\else
\pdfoutput = 1
\pdftrue
\fi


which is a very wrong way to check whether the output is DVI or PDF.

My suggestion is to change those lines into

%%% INITIAL CODE ----------------------------------------------------------
%% Flag for compilation to PDF
\RequirePackage{ifpdf}


Of course, the class license might not allow you to do it even on a copy with a different name, so you may be stuck. In that case, just add

\let\ifpdf\relax
\usepackage{mathtools}


after loading the class and hope for the best. Actually, always running pdflatex should have no consequence.

-
@EricAuld What problems? –  egreg Sep 26 '13 at 10:19
Edited the post to update, thanks again for your help. –  Eric Auld Sep 26 '13 at 10:22
@EricAuld Well, the environment is called multlined, not multilined. –  egreg Sep 26 '13 at 10:32
Oh, that explains a lot! –  Eric Auld Sep 26 '13 at 10:33