On 16/07/2021 20:50, James K. Lowden wrote: > On Fri, 16 Jul 2021 04:48:03 +1000 > "G. Branden Robinson" <g.branden.robin...@gmail.com> wrote: > >> XN is not a part of any _ms_ implementation I'm aware of, not even >> groff's. It does not appear in 4.2BSD ms or Version 10 Research Unix, >> either. >> >> In the groff system, XN is defined in spdf.tmac
Which, I would suggest, it should NOT be ... (and yes, it was I who put it there; that was an error of judgement, on my part). XN is a (rather crude) example of a technique for exploiting the s.tmac TOC macros, to create a table of contents, structured on the basis of heading levels established by the NH macro. Since it is provided purely as an example, it has no place in ANY of the standard macro packages; it would be more appropriate to relocate it to an "examples" repository, and, in hindsight I should have defined it directly within pdfmark.ms > Why not just fold spdf.tmac into ms.tmac? That would be ABSOLUTELY the wrong thing to do! See, s.tmac and pdfmark.tmac are two completely INDEPENDENT macro packages; either one may be used without ANY dependency on the other. (Users of -ms are NOT obliged to use -mpdfmark, and those requiring -mpdfmark may very well wish to use it in conjunction with some package OTHER than -ms). The purpose of spdf.tmac is to provide the BINDINGS between -ms and -mpdfmark, for those who DO wish to use the two together; as such, it implementss essential infrastructure, so that the two may interoperate seamlessly ... infrastructure which would NOT be provided by simply invoking "groff -ms -mpdfmark ...". It would be entirely feasible to provide similar -mpdfmark bindings for other macro packages than -ms; (say -mmpdf, for -mm, or -mepdf for -me). At the time, when I wrote pdfmark.tmac and pdfroff, I provided spdf.tmac bindings, and no others, simply because -ms is what I know, and I have no experience of using -mm, -me, -mom, or any other primary document styling macro package. > If you use -Tpdf, you automagically get what you want That's as may be, but it is entirely orthogonal to any discussion of the behaviour of pdfroff, (which predates gropdf, and uses -Tps, followed by ghostscript conversion to the final PDF output format). > IMO there shouldn't be "ms extensions". The -ms macro set should grow > as technology evolves. It already does! However, it should NOT be burdened with bindings for ANY other macro package, on which it has no dependency; such bindings are more appropriately implemented in a separate (wrapper) package, of which spdf.tmac (with XN factored out) is an example. Those who choose to use pdfroff, and desire -ms with -mpdfmark bindings, should invoke "pdfroff -mspdf ...", rather than "pdfroff -ms -mpdfmark ...". -- Keith.