EQN and TBL

Liam R. E. Quin lee at sq.sq.com
Thu Dec 14 06:21:17 AEST 1989


In article <7370004 at hp-lsd.COS.HP.COM> jimr at hp-lsd.COS.HP.COM (Jim Rogers) writes:
>Upon further study I find that text blocks, as useful as they are, are
>**not** necessary for combining tbl and eqn.

True.

You might also like to know that you can do

	.EQ
	delim @%
	.EN

instead of
	
	.EQ
	delim $$
	.EN

if you like.  This has two big advantages.  Firstly, you can define your
own macros without worrying that a $ in a macro will confuse eqn e.g.:
	.de B
	\fB\&\\$1\fP\c
	..
This is not so important, as you can use .so to read a file of macros if
you wany anyway.

The real big win is that if you accidentaly omit a delimiter, as in
	We can see that $a sup 2 is much closer to $pi$ than...
the rest of the document (up to a .EQ or .EN) gets inverted, so tht all of
the eqn text comes out normal, and eqn looks at all of the other text...
usually this causes syntax errors.

If instead I had written
	We can see that @a sup 2 is much closer to @pi% than...
then the effect would end at @pi$.

Finally, note that whilst @ is OK for a start delimiter, % occurs in
normal text, and is only ggod for the ending one.  And # does not work
at all, because tbl puts #-signs [pronounced `hash-signs' :-)] in its output.

Lee

[I was first shown the technique of using differing delimiters by David
 Epstein, in a paper written by Bill Thurston of Princeton]

-- 
Liam R. Quin, Unixsys (UK) Ltd [note: not an employee of "sq" - a visitor!]
lee at sq.com (Whilst visiting Canada from England, until Christmas)
 -- I think I'm going to come out at last...
 -- What?  Admit you're not a fundamentalist Jew?  They'll *crucify* you!  :-)



More information about the Comp.unix.questions mailing list