Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!ub!mdeck From: mdeck@sybil.cs.Buffalo.EDU (Mary Deck) Newsgroups: comp.text.tex Subject: TeX and marks Keywords: mark Message-ID: <41700@eerie.acsu.Buffalo.EDU> Date: 19 Oct 90 21:55:12 GMT Sender: news@acsu.Buffalo.EDU Organization: State University of New York at Buffalo/Comp Sci Lines: 41 Nntp-Posting-Host: sybil.cs.buffalo.edu Originator: mdeck@sybil.cs.Buffalo.EDU Hi, all. I'm trying to help a professor TeX a book he's writing. It's chock fullof exercises. He wants to put the exercise numbers in the odd-numbered pages' headlines. Ok. So I \mark{\the\exrno} (where \exrno is a count register) in the exercise macro. No problem. If \botmark is the same as \topmark, there are no exercises on the given (odd) page; he wants "Conventions" in the headline of such pages. If \firstmark is the same as \botmark, there is one exercise on the page; "Problem x" should appear in the headline. Otherwise, there are more than one exercises on the page; "Problems y--z" should be in the headline. So, in the headline macro, I said \if\topmark\botmark{Conventions} \else\if\firsmark\botmark{Problem \firstmark} \else{Problems \firstmark--\botmark} \fi\fi But, since that didn't work, I tried writing some stuff to a file to see what TeX was doing. It *really* surprised me to find out that \if\topmark\topmark, \if\firstmark\firstmark, and \if\botmark\botmark are rarely true. (What?!?! Something doesn't equal itself?!?!) I wrote to the junk file (with \write) the values of \topmark, \firstmark, and \botmark. Even when they printed out the same, they did not test the same. ??? What I would like to know is: 1) WHY are those \if's not always true? 2) How can I compare marks? I am by no means a TeX wiz, but my boss (who's about the closest thing we have around here) can't figure this out, either, so I don't feel so bad. :) Loads of thanks in advance.... ....Mary --- Mary M. Deck, Student Assistant, User Services University Computing Services, State University of New York at Buffalo mdeck@cs.buffalo.edu [Unix] acsgmmd@ubvms.cc.buffalo.edu [VAX/VMS]