Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!chalmers.se!cs.chalmers.se!jeffrey From: jeffrey@cs.chalmers.se (Alan Jeffrey) Newsgroups: comp.text.tex Subject: Re: TeX program that prints itself when typeset Message-ID: <4622@undis.cs.chalmers.se> Date: 16 May 91 12:36:05 GMT References: <3560@wn1.sci.kun.nl> Sender: news@cs.chalmers.se Organization: Dept. of CS, Chalmers, Sweden Lines: 16 In article <3560@wn1.sci.kun.nl> sommel@sci.kun.nl (Ron Sommeling) writes: >Below is a small plain TeX program that will print itself (in typewriter >font without pagenumber) when typeset. Are there shorter solutions? Well, this is actually 6 characters longer, but it's a bit `nicer', since it doesn't rely on the fact that ^^: is z. Otherwise it's the same mechanism... \output{}\def\do#1{\catcode`#112} \def~#1{\def~##1#1{##1#1##1#1\end}\dospecials\obeylines\tt~}~! \output{}\def\do#1{\catcode`#112} \def~#1{\def~##1#1{##1#1##1#1\end}\dospecials\obeylines\tt~}~! Alan. Alan Jeffrey Tel: +46 31 72 10 98 jeffrey@cs.chalmers.se Department of Computer Sciences, Chalmers University, Gothenburg, Sweden