1

I'm new to groff, so excuse me if it's a silly question. I can't find an appropriate solution for have two-columned content with one-columned footnotes. I've messed with .1C and .2C macros to get the desired result, but in vain. Is there a nice way to have your footnotes be in one column regardless of other content?

2 Answers 2

2

I'm pretty confident none of the stock groff macro packages support that, except possibly mom--meaning ms, mm, me, and the man page packages man and mdoc don't. You can check out mom's documentation online.

It could still be done; usually footnotes are formatted in a separate environment anyway, but there may be challenges involved with measuring the height of a footnote accurately when it might (normally) end up being broken across columns.

What you might do is replace the existing footnote system of a macro package like ms or mm with your own--in other words, never call the package's footnote macros. Instead call new ones that you define.

Then, starting from the simple columnation example from the groff Texinfo manual, section 5.25 "Page Motions" (file groff.YYYY-MM-DD.pdf), you might start to build your own. Sections 5.27 "Deferring Output" and 5.28 "Traps" from the same document provide some necessary background for implementing footnote support.

My advice would be to start with a fixed-size footnote region on the page; i.e., set the page location trap for footnote output at -2i (two inches above the page bottom) or so. This might suffice; if not you can subsequently tackle the added complexity of dynamically resizing the footnote area, having the trap retreat up the page as footnotes are added.

2
  • Thanks for your nice reply, but my friendship with groff is ended now (it's probably because it wasn't the right tool for me in the first place, honestly). Now I'll be mastering LaTeX to become a wizard of it. Commented Mar 24, 2023 at 20:43
  • 2
    Fair enough. Good luck, and we'll leave the groff light on for you! Commented Mar 25, 2023 at 0:22
0

TheNotoriousGBR's answer is correct. I, however, needed a comparable solution. I wrote in3 as a pre-processor which basically does this for me. See github in3xml for the code, if you're interested, and/or here for an example

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .