🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.groff.bug
Article #1

centred subscript dot

#1
From: James Clark
Date: Wed, 28 Oct 1992 09:23
45 lines
1981 bytes
   A subscript dot is used by the International Phonetic Association to indicate
   a retracted pronunciation. Is there a way to centre the dot with respect
   to the letter it is below by replacing the h'-0.3m' constant below with
   something which is equal in value to half of the width of the preceding
   character?

   ...
   Adapted from James Clark's version of the -me macros' .ds for , (cedilla):

   .ds . \k_\h'-0.3m'\v'.22m'\*(#[.\v'-.22m'\h'|\\n_u'
   .sz 16
   This is a test of the s\*. t\*. r\*. n\*. retroflex in groff.

The definition of `,' in the groff -me macros is

  .ds , \k_\h'-(\\n(.wu)',\h'|\\n_u'

`\n(.w' gives the width of the previous character.

If you want to center the dot under the previous character a suitable
definition would be:

  .ds . \k_\h'-\\n(.wu-\w'.'u/2u'\v'.25m'.\v'-.25m'\h'|\\n_u'

The groff \Z escape sequence is quite convenient here, allowing this
to be written as:

  .ds . \Z'\h'-\\n(.wu-\w'.'u/2u'\v'.25m'.'

This has the deficiency that it will fail if it's used in a macro
argument (because \n(.w gets expanded too soon).  The groff \E escape
sequence allows this problem to be avoided:

  .ds . \Z'\h'-\En(.wu-\w'.'u/2u'\v'.25m'.'

The other problem is that something like `y\*.' won't work.  This
can be fixed using the \n[.cdp] register.  Using this gives:

  .ds . \Z'\h'-\En(.wu-\w'.'u/2u'\v'.25m+\En[.cdp]u'.'

This definition still doesn't work as well as it might for italic
fonts.

James Clark
jjc@jclark.com
Technical Details
Message-ID: <9210280923.AA04466@jclark.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!jclark.com!jjc
References: <1992Oct24.102631.8985@julian.uwo.ca>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.groff.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!jclark.com!jjc
From: jjc@jclark.com (James Clark)
Subject: centred subscript dot
Message-ID: <9210280923.AA04466@jclark.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
References: <1992Oct24.102631.8985@julian.uwo.ca>
Distribution: gnu
Date: Wed, 28 Oct 1992 09:23:44 GMT
Approved: bug-groff@prep.ai.mit.edu
Lines: 46