bugGNU roff - Bugs: bug #59482, [ms] offer tip for end-of-input...

 
 

bug #59482: [ms] offer tip for end-of-input management

Submitter:  Dorai Sitaram <ds26gte>
Submitted:  Thu 19 Nov 2020 01:04:04 AM UTC
   
 
Category:  Macro ms Severity:  1 - Wish
Item Group:  Documentation Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 10 Aug 2023 02:01:45 PM UTC, comment #3: 

Here's another item for the recently conceived "_ms_ tricks" document or section of "ms.ms".  See, e.g., bug #60512.

G. Branden Robinson <gbranden>
Group administrator
Tue 04 May 2021 07:33:28 PM UTC, comment #2: 

I've lost my resolve on the right course for this.  As I noted in comment #1, .EM was not a documented part of ms's interface (neither in Lesk 1978 nor the BSD version by Kies and Tuthill).

Unix Text Processing by Dougherty and O'Reilly is probably a major historical driver of use of these undocumented macros.

I think the right thing to do for undocumented but historically popular back doors into the ms macros (.RT and .NP are other examples) is to discuss the issues head-on in an appropriate section of doc/ms.ms.  Right now I think that would come in a new section that also confronts the issue of document writers redefining ms macros.  Lesk encouraged this for some macros and ms.ms does, too.  Off the top of my head, this set consists of TA, PT, and BT.

Postponing pending further discussion or the groff 1.23.0 release.


G. Branden Robinson <gbranden>
Group administrator
Wed 06 Jan 2021 01:18:02 AM UTC, comment #1: 

.EM is not documented in Lesk 1978-11-13.

It also does not appear in the Berkeley ms manual[1].

It does appear in DWB 3.3 ms[2].

The DWB implementation does the following:

A. Breaks the output line.
B. Checks for and emits a diagnostic for an unclosed abstract (.AB).
C. Checks for and emits a diagnostic for an unclosed footnote (.FS).
D. In troff mode, draws cut marks at (or past?) the page bottom[3].
E. If a keep is pending, starts a new page to flush it (if I follow the logic of the use of the TB register and KJ diversion correctly).

At first blush, aliasing EM to pg@end-text, documenting EM, and advising the user to .am (append) to EM if they want to supplement end-of-input behavior, as UTP and Dorai note, seems like it should resolve the issue.

Comments?

[1] https://www.hactrn.net/ietf/rfcgen/textms.html
[2] https://github.com/n-t-roff/DWB3.3/blob/master/macros/ms/tmac.s.sr
[3] I note this for completeness.  groff_ms(7) already documents that our implementation does not implement cut marks.

G. Branden Robinson <gbranden>
Group administrator
Thu 19 Nov 2020 01:04:04 AM UTC, original submission:  

UTP (p. 534) says -ms pre-sets the end-of-input trap .em to a macro called .EM. The implication is that a user wanting to affect end-of-document behavior would append to this macro rather than directly calling .em.

I have found that Heirloom troff and Neatroff both allow this. groff does not.

groff's s.tmac sets .em to a macro called .pg@end-text. There is no .EM.

Rectifying this would allow the user the standard idiom of extending .EM in their chosen way, instead of having to deal with the macro .pg@end-text that looks like it was meant to stay hidden. It would also prevent the error whereby the user, finding that modifying .EM doesn't work, calls .em directly, thereby voiding -ms's previous assignment.

Dorai Sitaram <ds26gte>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by ds26gte (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-08-10 gbranden Severity3 - Normal 1 - Wish
        Item GroupFeature change Documentation
        StatusPostponed None
        Summary[ms] implement EM macro [ms] offer tip for end-of-input management
    2021-05-04 gbranden StatusConfirmed Postponed
    2021-01-06 gbranden Summary[ms] implement .EM macro [ms] implement EM macro
    2021-01-06 gbranden StatusNone Confirmed
    2021-01-06 gbranden Item GroupIncorrect behaviour Feature change
        Summarygroff -ms missing .EM macro [ms] implement .EM macro

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code