groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Explanations with an EQN User Guide


From: Damian McGuckin
Subject: Re: Explanations with an EQN User Guide
Date: Tue, 23 May 2023 14:41:24 +1000 (AEST)


Sadly Doug, I am nowhere near as economical with words as you!

On Mon, 22 May 2023, Douglas McIlroy wrote:

Basically, [if] a tab occurs within braces, it will be rejected.

Running eqn standalone, I got identical outputs from these two inputs

.EQ
a<tab>b
.EN

.EQ
{a<tab>b}
.EN

The tab is passed to groff as \t\, man 7 groff says \t is "uninterpreted", yet the tab skips to a tab stop set by .ta.

This leaves me totally confused, because groff apparently ignores \t when it doesn't come from eqn.

If, as i believe, eqn doesn't know about .ta and groff doesn't know about eqn and normally ignores \t, what causes the skip to happen?

Sorry Doug, I do not know. A gap in my knowledge.

That said, I think it is a bit more confusing than this. Taking the EQN
expression which is the solution of a quadratic equation

        a x sup 2 + b x + c = 0

from Ted Harding's document (which also uses braces), I put a tab OUTSIDE the EQN solution expression in braces and then subsequently, a tab INSIDE the braces in that same expression. While standalone eqn is very happy to process the first, it rejects the second. I am using 1.22.4. The text is

.\" a tab outside the expression in braces seems OK
.EQ
x  ~ = ~~
<tab>  { - b +- sqrt { b sup 2 - 4 a c } }
  over {2 a}
.EN
.sp
.\" a tab inside the brace causes 'eqn' to complain with
.\"
.\" eqn:zz:16: tabs allowed only at outermost level
.\" .EQ
x  ~ = ~~
  { <tab> - b +- sqrt { b sup 2 - 4 a c } }
  over {2 a}
.EN

So, a <tab> inside the expression wrapped in braces is an error! That said, in your far simpler example Doug, it is not. I am very lost.

For this error, I believe that 'eqn' is supposed to respect the existing '.ta' requests which means it cannot allow them inside an expression which it wants to set.

So, I would like to put in a user guide words like

   Avoid (like the plague) a tab anywhere between .EQ ... .EN or $ ... $
   for the case where those '$' are in-line EQN delimiters.

I find it is not worth exposing eqn to a <tab> anywhere.

I think my idea is good advice but does it belong in a user guide!

Thanks - Damian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]