Path: utzoo!censor!geac!sq!lsuc!attcan!uunet!know!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!ux1.cso.uiuc.edu!csrd.uiuc.edu!s41.csrd.uiuc.edu!eijkhout From: eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) Newsgroups: comp.text.tex Subject: Re: TeX and marks Keywords: mark Message-ID: <1990Oct22.224527.28858@csrd.uiuc.edu> Date: 22 Oct 90 22:45:27 GMT References: <41700@eerie.acsu.Buffalo.EDU> Sender: news@csrd.uiuc.edu (news) Organization: UIUC Center for Supercomputing Research and Development Lines: 34 mdeck@sybil.cs.Buffalo.EDU (Mary Deck) writes: [ introduction deleted] > \if\topmark\botmark{Conventions} > \else\if\firsmark\botmark{Problem \firstmark} > \else{Problems \firstmark--\botmark} > \fi\fi >What I would like to know is: >1) WHY are those \if's not always true? >2) How can I compare marks? About \if: this is a test for equality of *character codes*. Therefore if there is something that is not a character, it is expanded until after \if there are two things that are either a charcter, or an unexpandable control sequences. All control sequences are the same for this test, but they differ from all characters. Now suppose \topmark is {ab}. Then \if\topmark\topmark expands to \if ab\topmark. 'a' and 'b' are compared, are unequal, and therefore... The test you want is \ifx. I'm not quite sure what the 'x' stands for, but I interpret it as `extensive equality'. Quite likely it does exactly what you need. >Loads of thanks in advance.... You're welcome. > ....Mary Victor.