Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to use amspset. Here is my minimum code:

\documentclass[12pt,letterpaper]{amspset}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}

% info for header block in upper right hand corner
\name{}
\class{}
\assignment{}
\duedate{}

\begin{document}
\end{document}

When compiling, there is an error:

! Package ifpdf Error: Name clash, \ifpdf is already defined.

I was wondering why and how to solve the problem? Thanks!

share|improve this question

1 Answer 1

up vote 17 down vote accepted

This error occurs because the \ifpdf switch is getting defined by two different packages. Normally the ifpdf package should be used for that, but amspset seems to do this by its own.

To fix this, mark it as undefined after the \documentclass using:

\let\ifpdf\relax

I can't test it with my TeXLive installation because it doesn't have amspset. If it doesn't work try to move the above line around a little.

share|improve this answer
    
Thanks! It works! I was wondering what does let and relax mean? –  Tim Feb 18 '11 at 14:12
    
@Tim: \let copies the meaning of one macro to another, i.e. \ifpdf is identical to \relax afterwards. The \relax macro is a no-op (no operation) command which, simply said, tells TeX to do nothing. By making \ifpdf identical to it the ifpdf package thinks it isn't defined yet. For a reason to long to explain here many is-the-macro-defined tests can not differ between an undefined macro and one identical to \relax. –  Martin Scharrer Feb 18 '11 at 14:18
    
Thanks! So if I understand correctly, after \ifpdf being made identical to \relax by \let, \ifpdf will act as if it was undefined? \relax is a built-in command which does nothing? –  Tim Feb 18 '11 at 14:28
    
@Tim: After the \let, \ifpdf will be taken as undefined but it wont cause an error if used. The \relax built-in command (a so called primitive) will be ignored by TeX when it is executed, but it is used at some points as a kind of stop marker. It is placed where you or TeX needs a command but you don't actually want to place or execute anything. See also this TeX FAQ for further explanation about this technique. –  Martin Scharrer Feb 18 '11 at 14:37
1  
@MartinSchröder: amspset seems to be a rather small class, not fully up-to-date with the current state of the LaTeX art, which is also not on CTAN. I wrote an email to the author now with some improvement suggestions. I CC'ed you on it using your email address I found in one of your package manuals. –  Martin Scharrer Dec 22 '11 at 20:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.