groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mom footnote belonging to a Heading


From: Peter Schaffter
Subject: Re: mom footnote belonging to a Heading
Date: Sun, 29 Mar 2020 16:04:57 -0400
User-agent: Mutt/1.9.4 (2018-02-28)

Heinz --

On Sun, Mar 29, 2020, Heinz-Jürgen Oertel wrote:
> I have a need to place a foote note to a HEADING, but can not manage it.
> Any hint for me?
> 
> example:
> 
> .HEADING 1 "Aus der Dobrudscha und Bessarabien"
> .FOOTNOTE
> Dieser Teil erschien im Jahrbuch 1963 ab Seite 173
> .FOOTNOTE END
> .HEADING 2 "Deutsches Leben am Schwarzen Meer: was lehrt Sarata?"

Mom's HEADING macro cannot natively accommodate footnotes because
the break after each line of heading text is hardwired in.  IOW, \c
as the last character of heading text has no effect; it does not
join the footnote marker to the head, but rather plants it at the
beginning of the next line of regular text.

As a workaround, insert this code at the top of your file:

  am HEADING
    .ev HEADING
    .vpt 0
    .sp -1
    .vpt
    .nop \v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\h'\w'\\$1'u'\c
  ..

This allows adding a footnote to any heading level provided that

  - no \c is attached to the heading text
  - the footnote is terminated with .FOOTNOTE END BREAK

Text after a HEADING or a HEADING+FOOTNOTE must be a PP, EPIGRAPH, QUOTE,
BLOCKQUOTE, CODE, or another HEADING.  If not, insert

  .br
  .ev 0

after the HEADING.

Example:

  .HEADING 1 "Aus der Dobrudscha und Bessarabien"
  .FOOTNOTE
  Dieser Teil erschien im Jahrbuch 1963 ab Seite 173
  .FOOTNOTE END BREAK
  .PP
  Paragraph text.
  .HEADING 2 "Deutsches Leben am Schwarzen Meer: was lehrt Sarata?"
  .br
  .ev 0
  Text not introduced by PP.

I'm not sure how robust this is, though it works well in the testing
I've done.

-- 
Peter Schaffter
http://www.schaffter.ca



reply via email to

[Prev in Thread] Current Thread [Next in Thread]