This is helpful! Thank you for taking the time to write it up.
I didn't know about '\&' as a way to "short circuit" groff from interpreting something as a macro that should be literal (such as a line-initial period). That's great to know.
I've found a couple of resources that have been helpful. Mostly, I've been referring to this[0] page on gnu.org. I've also learned from this[1] article on Linux journal and Luke Smith's YouTube playlist[2] on groff.
To practice, I'm trying to re-typeset a paper I wrote in school that follows the Chicago Manual of Style[3]. I formatted the original in MS Word using a template my school provided, so I have something to visually compare against. I'm using the -ms macro set, mostly because that's what Luke Smith demos in his videos so that's what I got started with.
I've already got a reasonable imitation of the original document, which is fun and a bit rewarding. But there's a couple of very small details that I'm finding difficult to crack. Are you very well-versed with -ms? In particular, right now I'm trying to figure out how to add one blank line of space in footnotes AFTER the horizontal line, but BEFORE the first footnote begins. I suspect I'll need to redefine the -ms macro that controls the trap for footnotes...? But I haven't figured out which macro that is just yet.
Sadly I don’t know how to futz about with traps, I just haven’t gotten
to that point yet in my use of groff.
First I would point you to the manpage, but, we all know that manpages are a mess, so it might not be there.
I will however point you, perhaps not /super/ helpful, but alas, I know not of any better solution.
If you go to
/usr/share/groff/current/tmac/s.tmac
and search for «module fn», that should be the code for the footnotes.
Aside, the -ms name comes from this, -m means macro, and whatever letter comes after it is the macro set, hence why -man will be called an.tmac in groff source code, or in this case, s.tmac.
I am not sure where documentation is on traps in groff, but I assume it’s buried withing some manpage or info document somewhere.
Software is crap, eh? :D
Of course, you could ask in the groff mailing list[1], they are usually pretty helpful in these matters.
Which course of action you chose is of course up to you, I will investigate for myself as well to educate myself more on traps.
I didn't know about '\&' as a way to "short circuit" groff from interpreting something as a macro that should be literal (such as a line-initial period). That's great to know.
I've found a couple of resources that have been helpful. Mostly, I've been referring to this[0] page on gnu.org. I've also learned from this[1] article on Linux journal and Luke Smith's YouTube playlist[2] on groff.
To practice, I'm trying to re-typeset a paper I wrote in school that follows the Chicago Manual of Style[3]. I formatted the original in MS Word using a template my school provided, so I have something to visually compare against. I'm using the -ms macro set, mostly because that's what Luke Smith demos in his videos so that's what I got started with.
I've already got a reasonable imitation of the original document, which is fun and a bit rewarding. But there's a couple of very small details that I'm finding difficult to crack. Are you very well-versed with -ms? In particular, right now I'm trying to figure out how to add one blank line of space in footnotes AFTER the horizontal line, but BEFORE the first footnote begins. I suspect I'll need to redefine the -ms macro that controls the trap for footnotes...? But I haven't figured out which macro that is just yet.
[0] "The GNU Troff Manual", https://www.gnu.org/software/groff/manual/groff.html
[1] "Typesetting with groff Macros", https://www.linuxjournal.com/article/4375
[2] "groff/troff for Minimalist Document Complication", https://www.youtube.com/playlist?list=PL-p5XmQHB_JRe2YeaMjPT...
[3] "The Chicago Manual of Style Online", https://www.chicagomanualofstyle.org/home.html