Re: [groff] Heirloom troff invoke macro from string

2019-01-07 Thread Mircea Hossu
Thank you, Tadziu, it is an interesting trick and it does work in the test case posted earlier. Unfortunately, in a more realistic document, I did hit those "unexpected results", e.g. when the string was used inside a macro argument (thank you for the warning). The final solution I picked was to c

Re: [groff] Rate this hack on a scale of 0 to stupid

2019-01-07 Thread John Gardner
Hi Ingo, Thanks for taking the time to check! Ugh, I wasn't aware Solaris was using DocBook/XML... yuck. *> That said, no need for the man -w actually:* Yes, I realised that only after I sent the original e-mail, haha. Even passing a dummy man-page would have been smarter than shelling out to ma

Re: [groff] Rate this hack on a scale of 0 to stupid

2019-01-07 Thread Ingo Schwarze
Hi John, oh, and a few more remarks: John Gardner wrote on Mon, Jan 07, 2019 at 08:08:51PM +1100: >1. I want/need a way to programmatically (and *reliably*) locate the >directories containing a Groff installation's .tmac files. Plural for good reasons. There is no guarantee all tmac fi

Re: [groff] Rate this hack on a scale of 0 to stupid

2019-01-07 Thread Ingo Schwarze
Hi John, John Gardner wrote on Mon, Jan 07, 2019 at 08:08:51PM +1100: > $ GROFF_TMAC_PATH=`pwd` groff -Tutf8 -z -mtrace-paths -man `man -w man` > Now, tell me. How could this trick go wrong...? > uname -a SunOS unstable11s 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise > man -w man usage:

[groff] Rate this hack on a scale of 0 to stupid

2019-01-07 Thread John Gardner
First, the situation: 1. I want/need a way to programmatically (and *reliably*) locate the directories containing a Groff installation's .tmac files. This is happening in JavaScript, without the user's intervention. 2. I don't want to make assumptions about standard tmac locations like