Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!gauss.rutgers.edu!math.rutgers.edu!carllee From: carllee@math.rutgers.edu (Carl Lee) Newsgroups: comp.text,ru.qa.tex Subject: Re: Strange Event in LaTeX Message-ID: Date: 12 Feb 90 19:02:51 GMT References: Organization: Rutgers Univ., New Brunswick, N.J. Lines: 48 ->I must be doing something wrong, but I do not understand what. Maybe ->someone out there can solve this puzzle. -> ->I have the following file: -> ->---------------------------------------- -> ->\documentstyle{article} ->\begin{document} -> ->\long\def\text#1{\long\def\textx{#1}} ->\long\def\print{\if\empty\textx\else{Text: \textx}\fi} -> ->\text{Hello} ->\print -> ->\text{I: Hello} ->\print -> ->\text{II: Hello} ->\print -> ->\end{document} -> ->---------------------------------------- -> ->When I process it with LaTeX, the output is: -> ->---------------------------------------- -> ->Text: Hello -> ->Text: I: Hello -> ->:Hello -> ->---------------------------------------- -> ->In other words, the presence of "II" causes the command "print" to ->malfunction. Does this happen to you? What is going on? Addendum: It seems that when "II" is replaced with any pair of identical characters, this behavior results. Carl Lee carllee@dimacs.rutgers.edu