groff
[Top][All Lists]
Advanced

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

EQN - Avoiding bad habits


From: Damian McGuckin
Subject: EQN - Avoiding bad habits
Date: Wed, 21 Jun 2023 05:34:03 +1000 (AEST)


In trying to update a user-guide with more examples, I want to avoid an example which just shows my bad habits.

Consider a matrix with two 4 element columns

                T       P
                U       Q
                V       R
                W       S

where the height of T is much taller than P, U is much shorter than Q,
V is much taller than R and U is much shorter than S.

Now T is above U is above V and is above W.

Similarly for the second columns.

But the two columns do not collaborate on their 'above' alignment.

The result is that the top of the 3rd element of the first column is part way up from the bottom of the 2nd element of the second column.

I have an example where the tall entries are partial differentials and the short entries are zero. I can make the zeroes taller by giving it both an invisable (heightened) superscript and an invisable (lowered) subscript.
I think that is a quick and dirty fix.

Is there an elegant fix?

See my bad example here, A is the original and B has my 'fix'.

The PDF is attached.

.\" No macro package needed
.\" groff -e -Tpdf ... > PDF-file
.\" Using updated pdf.tmac from Deri's email to list of 14th June
.sp 6
.ps 12
.vs 14
.EQ
define hi '{h sub i}'
define dhi '{partial hi}'
define r1 '{r sub 1}'
define dr1 '{partial r1}'
define r2 '{r sub 2}'
define dr2 '{partial r2}'
define zero '{ { 0 sub { down 50 "\&" } } sup { up 50 "\&" } }'
A ~~ = ~~ left [ matrix
{
   ccol { dhi over dr1 above 0 above dhi over dr2 above 0 }
   ccol { 0 above dhi over dr1 above 0 above dhi over dr2 }
}
right ]
~~~~~~~~
B ~~ = ~~ left [ matrix
{
   ccol { dhi over dr1 above zero above dhi over dr2 above zero }
   ccol { zero above dhi over dr1 above zero above dhi over dr2 }
}
right ]
.EN

Thanks - Damian

Attachment: TallShortEQN.pdf
Description: Adobe PDF document


reply via email to

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