Path: utzoo!mnetor!uunet!munnari!otc!metro!basser!elecvax!agsm!bobm From: bobm@agsm.unsw.oz (Robert Marks) Newsgroups: comp.text Subject: Re: troff query: tilde and ~ in eqn with .tr ~ Message-ID: <568@agsm.unsw.oz> Date: 23 Mar 88 08:31:30 GMT Organization: Australian Graduate School of Management Lines: 31 Summary: answer: use a sed filter between eqn and ditroff Thanks to Reinhard Foessmeier the problem is solved. The problem was how to print ~ as a diacritical in eqn (using the tilde function) while also using ~ as an unpaddable space in both ordinary text and in eqn (where it has a special status). It is now clear to me that with .tr ~ on, no ~s can be printed. (I had wondered whether eqn mightn't turn off the .tr somehow. But examination of diacrit.c in the eqn sources showed that it doesn't. BTW, the examination also showed me that utilde is a supported but undocumented eqn function, which prints understrike tildes: try x utilde.) Reinhard suggested a sed filter between eqn and ditroff to take advantage of the observation that eqn adds tilde diacriticals to equations in a manner which enables isolation of these while all other remaining ~s in the text are stream-edited to spaces. (eqn substitutes spaces for ~s within equations, so these have already disappeared downstream of eqn.) I used the filter eqn file | sed '/^\.ds/!s/~/ /g' | ditroff ... which substitutes a space for all occurrences of ~ except those in lines beginning .ds Since I found that eqn was putting its diacritical tildes in .ds lines: .ds 13 \v'-.1m'\s+1~\s0\v'.1m' So now the problem is solved. Bob Marks Australian Graduate School of Management, University of New South Wales, PO Box 1, Kensington, NSW 2033, Australia. Phone: +61 2 662-0271 Fax: +61 2 662-2451 ARPA: bobm%agsm.unsw.oz@uunet.uu.net ACSnet: bobm@agsm.unsw.oz CSNET: bobm%agsm.unsw.oz.au JANET: agsm.unsw.oz!bobm@ukc UUCP: {uunet,hplabs,ukc,mcvax,ubc-vision,nttlab}!munnari!agsm.unsw.oz!bobm