Re: There is a severe problem with EQN and square roots

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <20260212132356.hcyt3ohbkvoruzur@illithid>
Hi Sigfrid,

Slightly editing my quote of you below
At 2026-02-12T11:17:01+0100, Sigfrid Lundberg wrote:
[...]
> I had actually forgotten that I had filed a bug report.
> 
> Inspired by the discussion I looked around in the tmac and font
> directories and found some odd definitions.

If you're referring to this:

$ git grep -nw sr tmac/ps.tmac
tmac/ps.tmac:30:.char \[radicalex] \h'-\w'\[sr]'u'\[radicalex]\h'\w'\[sr]'u'

...which is then fixed by...

> ...add[ing] another of my own (in my document)
> 
> .char \[sr] \[u203E]
> 
> then it seems as if the radical and the bar actually connect.

...then that sounds like the exact issue being tracked in Savannah
#63179...

https://savannah.gnu.org/bugs/?63179

...and further, it sounds like the font you're using does in fact _not_
define a radical extension glyph that is positioned, as I put it,
"weirdly as hell" relative to its bounding box.

> The square root symbol is too bold, but otherwise OK.

_That_ issue is being tracked as the one you filed, Savannah #67796.

http://savannah.gnu.org/bugs/?67796

I neglected to say what I thought could be done about that, beyond not
using \[sr] and \[radicalex] characters typeset at a larger size than
the radicand.  Merely "not using" them would typeset nothing in their
place, making radical signs invisible, a severe defect.

The alternative I had in mind but did not express was having eqn emit
(in troff mode) drawing commands to simulate the radical.

I'm attaching a crude sketch of what I have in mind.  Don't pay too
close attention to all the numerical figures in the *roff source; they
are present because I didn't use eqn at all to typeset this.

eqn aligns things much more nicely.  The thrust of the example is to
demonstrate the relative straightforwardness of drawing a radical sign
with `\D` escape sequences.  This can (and should, if chosen as the
solution to #67796) be refined to improve the appearance of the drawn
sign.  Improvements could include (a) using slightly different
thicknesses for the various strokes of the radical sign; (b) altering
the length of its leading horizontal stem; and (c) altering the angles
of the non-horizontal strokes.

Regards,
Branden
draw-radical.groff (text/plain, 450 B)
.\" Draw a big radical sign with a fraction radicand in GNU troff.
.sp 1i
Expression with \[lq]hand-drawn\[rq] radical sign:
.sp 2v
\Z"\
\D'l 1m 0'\
\D'l 1v 1v'\
\D'l 0 -3v'\
\D'l 4m 0'\
"\c
.\" Now move inside the radical sign.
\h'1m+1v+1n'\v'-1v'
.ft I
foobar
.br
\h'1m+1v+0.5n'\v'-1.5v'
\Z"\D'l 6n 0'"
.br
\h'1m+1v+1n'\v'-1.5v'
bazqux
.ft
.\" Do the same thing with GNU eqn.
.sp
Expression using
.ft I
eqn:
.br
.EQ
sqrt { foobar over bazqux }
.EN
draw-radical.ps (application/postscript, 7.2 KB) - not displayed
draw-radical.png (image/png, 27.3 KB) - not displayed
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmmN1GUACgkQ0Z6cfXEm
bc54aA/9Go6AdUJui2+ei3dBcEwklYhcYe5BoTw0LiLe9jgaKMwxaubo1SUQir+R
47yAcxNTEI1+060NBU6o73DYqU4hss6HT5r+pNlE725zJdmmpKrif20h9EBr37EC
TgpfhN72tcnDoQiR6jn0GRmJ9LKfmG+Y8Jv4VaX5XIws/Vef2QDusDczsliPmZHP
LnIpRqxPgiHLr3Pj8ia9CWR4gupbYnf/KXgvXX7T6VRbWF6Jya0qMvROkNwpDa0t
cTdBhG6t2HZOLAoJESxgE4Bo2g0MUchQQPuMNeopzlghzAwElLOBBej86YJHjFJ1
3UlMr9UJgT5j8xopvid2/P1yZHnug4cSzJIO3TuwjJgqEDd2+VUwyHQu6iojJPhg
T3Ib/m4+UpMom5OoSWZFdbhQnbnlNtSH2S9cpZY2EaWYAVPRhsb+8SvhnX3iSEpr
yeOmS2IKZQViXUnBU/k5mxW3kv24xe8XIHzHHdMlZuC6px+8QnCU/271E0jEf3St
2Xum4BQ8BIbvBq3gTPQbS2BHh2oeUkoP0BRbAa83wXbYkocuoPdUudThb8XXUQW/
4WxE2cVFPCBUajtLR6rhXwuIVe0ESMx6ibx04dty9Qv7fXFmj2n5KFmdAo8JGh52
gkYFLAwnigS+LqYJAw/eJpFA5KzvBjWAvB7CyT4+Y23aDdpckuA=
=xRFl
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.