On 2021-01-08, Dorai Sitaram wrote:
> What's a good way to put a bit of text in the left margin of the
> "current" line?

With ms, I would do this:

   .LP
   .mk
   .po -2m
   >>
   .br
   .po
   .rt
   Some text.

This results in ">>" being put to the left of "Some text". You can read about .mk and .rt in 5.22 "Page Motions" in the groff manual. Very useful requests!

> [...] the marginal-note (I believe this is the technical term
> for this) text isn't required to be multi-line, if that makes the
> implementation any easier.

It certainly does! They're usually called "margin notes", and they're quite hard to implement (if they are to be multi-line and continue on the next page etc.).

Best regards
John


Reply via email to