Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!newton!lgy From: lgy@phys.washington.edu (Laurence G. Yaffe) Newsgroups: comp.text.tex Subject: Re: Recognizing keywords etc using TeX Message-ID: Date: 7 Jun 90 20:13:06 GMT References: <5421@vanuata.cs.glasgow.ac.uk> Sender: news@milton.acs.washington.edu Lines: 19 johnsson@cs.glasgow.ac.uk (Dr. T. Johnsson) writes: >How would one design macros or environments to prettyprint computer >programs? The tricky bit (presumably!) would be to recognize keywords >and other special symbols of a programming language, and output them >in \bf or as math, instead of some default treatment. For instance, >Thomas Johnsson (cs.glasgow.ac.uk) I have never understood why this printing style deserves to be called "pretty". It places excessive emphasis on the language keywords; they should never be the focus of attention for someone trying to understand the program. In prose, one would never print punctuation marks like commas or periods in a way which gave them greater visual impact than ordinary letters - why do it with programs? -- -------------------------------------------------------------------------- Laurence G. Yaffe Internet: lgy@newton.phys.washington.edu University of Washington Bitnet: yaffe@uwaphast.bitnet