On Mon, Mar 30, 2020, Heinz-Jürgen Oertel wrote: > Am Sonntag, 29. März 2020, 22:04:57 CEST schrieb Peter Schaffter: > > 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? > > > 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. > > works not perfect, sorry, attached the result as screen shot. > You see the foot note number just behind the capital letter 'B'
You neglected to say you were centering your headings. :) The following amended code should take care of the problem: .am HEADING . ev HEADING . shift \\n[.$]-1 . vpt 0 . sp -1 . vpt . nr heading_w \w'\\$1' . nr center_i \\n[.l]+\\n[.i]-\\n[heading_w]/2 . if \\n[.ce] .in \\n[center_i]u . nop \h'\w'\\$1'u'\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\c .. A minor annoyance to this is that you must pop the HEADING environment explicitly after the footnote: .HEADING 1 "Aus der Dobrudscha und Bessarabien" .FOOTNOTE Dieser Teil erschien im Jahrbuch 1963 ab Seite 173 .FOOTNOTE END BREAK .ev .PP Begin paragraph text... Please test. Further tweaks may be required. -- Peter Schaffter http://www.schaffter.ca