Tadziu Hoffmann wrote on Mon, Aug 20, 2018 at 11:22:44PM +0200: > > I would like to add that I sometimes get the > > impression that people think that once they use a macro > > package, raw formatter requests should not be used anymore, > > as they somehow taint the "purity" of the manuscript. > > (This idea also appears to exist among some LaTeX users.) > > > > But this is of course nonsense.
Ingo Schwarze replied: > Indeed. That only applies to some special areas like manual pages, > where you want consistency across a wide range of authors, document > maintainers (many of whom are inexperienced with typesetting), > operating systems, and formatting tools. > . . . > When you write a book, consistency with a book written by someone else > on the other side of the globe is of relatively little concern. As > opposed to the case of manual pages. But even a book needs to be internally consistent, and it’s a lot easier to do this with macros. I think Tadziu, Ingo, Peter, and others have addressed the topic pretty well. Kernighan said that the single most important rule of using troff is not to use it directly, but through some intermediary. I think this is a bit extreme, but closer to the truth than I appreciated when I first read it in the mid-1980s. And possibly so for reasons even Kernighan didn’t realize. His advice would later come to haunt me. When I first used troff, it was in many situations for which consistency was essential. I did work with a couple of standards organizations, and a compilation of such standards must necessarily be consistent if the organization is to be perceived as more than a bunch of buffoons. Most standards authors used WordPerfect or MS Word; those who used the latter almost never used (or had even heard of) styles. Suffice it to say that formatting was all over the map, often even within a given document. Standard procedure was to take a word-processor-generated manuscript and save it as an ASCII file to strip all the presentational formatting, and then re- format using (hopefully) consistent (but still usually presentational) directives. Better than retyping, I guess ... I also needed consistency in formal documents produced by my company. Because we used troff (sometimes at gunpoint ...), we didn’t have quite so much variation. But initially, I put far too much emphasis on having people learn the gritty details, which hurt consistency as well as causing a lot of grief for people who weren’t especially into typesetting. The details are essential for those who write macros, of course. But most people don’t, and in most cases they may be better off not knowing how to build a watch. I later stressed the importance of using macros, resorting to low-level requests only when unavoidable. Let’s just say that this kept the users much happier while producing much more consistent documents. Consistency was especially important when multi-author documents had to be combined in a tight time frame. We used the mm macros, mainly because they were the only package other than man and mv that we had. Ancient as it now may seem, mm still allowed a reasonably semantical perspective. We added a fair number of extensions; for example, with a couple of extra macros, we made pretty decent transparencies for overhead projection—all without the need to learn a new package (mv) specific to the task. Equally important, we could easily repurpose the source for the viewgraphs to normal mm for handouts. If certain things that an existing package doesn’t cover come up frequently, it makes sense—especially when several people are involved— to extend the package and cover the exceptions consistently. But for things that are infrequent or almost unique, it’s tough to justify the time and effort to write, debug, and document the extensions. So I’d probably modify Kernighan’s advice to say use an intermediary (usually, a macro package) when possible, and use formatter requests when necessary. Sometimes you do what you gotta do, especially when you gotta get it done fast. Obviously, I have a pretty strong bias toward semantical coding. But I got there from long experience diddling the details and concluding it wasn’t the way to go. Clearly, I had erred in thinking I was smarter than Kernighan. Meanwhile, Back at the Ranch ... -------------------------------- Getting back to the original post: it sure seems to me that using another language to generate troff requests is doing things the hard way. Unless one of the existing macro packages is severely deficient, it would seem much easier to just use it, perhaps using just the most essential features. Barring some magic that I’m missing, I don’t see a new, ostensibly higher-level syntax as any easier. It’s just different, and yet another language that a user familiar with what exists needs to learn. Jeff