🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #6847

Strange Event in LaTeX

#6847
From: Carl Lee
Date: Mon, 12 Feb 1990 18:07
42 lines
1142 bytes
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? 

Carl Lee
carllee@dimacs.rutgers.edu
Technical Details
Message-ID: <Feb.12.13.07.48.1990.20578@math.rutgers.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!swrinde!ucsd!rutgers!gauss.rutgers.edu!math.rutgers.edu!carllee

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!swrinde!ucsd!rutgers!gauss.rutgers.edu!math.rutgers.edu!carllee
From: carllee@math.rutgers.edu (Carl Lee)
Newsgroups: comp.text,ru.qa.tex
Subject: Strange Event in LaTeX
Message-ID: <Feb.12.13.07.48.1990.20578@math.rutgers.edu>
Date: 12 Feb 90 18:07:49 GMT
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 42