Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!xor.Eng.Sun.COM!rom From: rom@xor.Eng.Sun.COM (Circuit Group) Newsgroups: comp.text.tex Subject: simple tex/latex question/puzzler/quiz Message-ID: <4221@exodus.Eng.Sun.COM> Date: 10 Dec 90 06:37:54 GMT Sender: news@exodus.Eng.Sun.COM Lines: 35 I'm stuck; any help is welcome. ------------------------------------------- \documentstyle{article} \begin{document} \def\macro1{apple} \def\macro2{\macro1} \ifx \macro1\macro2 truetext \else falsetext \fi macro1\macro1 end macro2\macro2 end some text here. \end{document} -------------------------------------------- produces: falsetext macro1appleend macro2appleend some text here. ------------------------------------------- It appears that \ifx is not expanding the macro \macro1, does this make sense? How can I get an if statement that expands macros until its just text? Am I doing this the wrong way? I'm trying to write a .sty file and so I don't think that I can use \ifthen. ANY HELP WILL BE APPRECIATED. BTW are there any books other than the ones by Knuth and Lamport that explain this stuff; I have both books and find the one by Knuth to be cryptic, wereas the one by Lamport does not give enough information. Thanks. -Ram -- -Rom rom@xor.sun.com