On 26-Oct-09 08:15:04, Werner LEMBERG wrote: > This is an interesting question. It seems that this is a generic > limitation even present with AT&T. Can someone confirm and/or > comment? > Werner
Interesting indeed! Iit is clear that Michael Cain's explanation (quoted below along with the original example of triggering code) is correct. I have also checked that using @, ~. !, ^, ~, and ' as eqn delimiters is fine, so the problem is specific to #. It makes no difference to enter 'delim(##);' under the .TS line: this does not change the behaviour of tbl -- it still outputs lines like .T# .mk #T .de T# [...] .. .T# Since it is recommended to run the code through tbl, pic, eqn in that order, this result is inevitable with things as they stand. Also, clearly tbl must be able to define its own variables, etc., so whatever it used for this purpose risks clashing with non-standard choices of eqn delimiters. So I suggest that the "cure" (strictly speaking a prophylactic) is simply to include a statement in eqn and tbl documentation saying that the use of "delim ##" for eqn will clash with tbl, say under "INTERACTION WITH EQN" in 'man tbl'. There are at present no such warnings in 'man eqn'! This would not be the only instance of advice to avoid certain kinds of names e.g. for tbl: "tbl uses register, string, macro and diversion names beginning with the digit 3. When using tbl you should avoid using any names beginning with a 3." In any case, since "#" is a comment-marker for pic, it is surely unwise to use it as an eqn delimiter! Probably this has passed unnoticed for so long because usually people will use "$$" for eqn delimiters anyway, making sure that the monetary usage is entered as \[Do] or equivalent. If I am including source text with "$" in it, I always purge these first (using vim) by running ":s/\$/\\[Do]/g" on that passage first. Ted. ###################################################################### >From Michael Cain: ================== The tbl preprocessor makes extensive use of the # character, including creation of a macro named T#. When instructed to do so, the eqn preprocessor subsequently picks these up as delimiters, and then complains about the contents, as well as creating mangled things to pass on to groff. Under some circumstances, tbl may use other special characters in names as well. All of $, % and @ appear to be safe delimiters when placing equations in a table. On Oct 9, 2009, at 7:24 AM, Denis M. Wilson wrote: [snip] .EQ delim ## .EN .TS l. #a# .TE ###################################################################### -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 26-Oct-09 Time: 09:37:39 ------------------------------ XFMail ------------------------------