Newsgroups: comp.text.tex
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!rice!tone.rice.edu!dorai
From: dorai@tone.rice.edu (Dorai Sitaram)
Subject: Re: \obeyindentedlines
Message-ID: <1991Apr22.205836.18132@rice.edu>
Sender: news@rice.edu (News)
Organization: Rice University, Houston
References: <1991Apr22.205010.17846@rice.edu>
Date: Mon, 22 Apr 91 20:58:36 GMT

In article <1991Apr22.205010.17846@rice.edu> dorai@tone.rice.edu (Dorai Sitaram) writes:
>% ***** obeyindentedlines.sty *****
>
>\def\makeactive#1{\catcode`#1\active}
>
>\def\singlespace{\ }
>\def\tabspace{\ \ \ \ \ \ \ \ }
>
>{\makeactive\^^M%
>\makeactive\ %
>\makeactive\^^I%
>\gdef\obeyindentedlines{%
>\makeactive\^^M%
>%
>\def^^M{\par\mbox{}%
>\begingroup%
>\makeactive\ %
>\makeactive\^^I%
>\let \singlespace%
>\let^^I\tabspace%
>\keepindents}%
>%
>\def\keepindents{\futurelet\next\keepindentsII}%
>%
>\def\keepindentsII{\ifx\next  \noexpand\keepindents%
>\else\ifx\next^^I^^I\noexpand\keepindents%
>\else\noexpand\endgroup\fi\fi}%
>}}


Ah, that's obviously wrong since it doesn't progress (or _eat_) any
spaces.  Yes, I've tried

{
...
\def\keepindents{\futurelet\next\keepindentsII}%
%
\def\keepindentsII{\ifx\next  \noexpand\keepindentsIII%
\else\ifx\next^^I^^I\noexpand\keepindentsIII%
\else\noexpand\endgroup\fi\fi}%
%
\def\keepindentsIII##1{\keepindents}
...
}

but that doesn't help either.  This is getting to be uncomfortably
tantalizing!

--d
