Changing the formatting of footnotes

I would like my footnotes to look similar to this:

That is, have the footnote number, not necessarily in superscript as in the example above,

  • but in footnote size placed on the baseline at the lefthand margin of the page,

  • and then have the entire footnote-text indented by 36pt or 1.27cm to account for 3 digits in the footnote numbers.

I tried this in the preamble of my document:

<assign|render-footnote*|<macro|sym|nr|body|<\float|footnote|>
       <small|<with|par-mode|justify|par-left|1.27cm|par-right|0cm|font-shape|right|dummy|<value|page-fnote-sep>|dummy|<value|page-fnote-barlen>|<surround|<locus|<id|<hard-id|<arg|body>>>|<link|hyperlink|<id|<hard-id|<arg|body>>>|<url|<merge|#footnr-|<arg|nr>>>>|<arg|sym>><footnote-sep>|<set-binding|<merge|footnote-|<arg|nr>>|<value|the-label>|body><right-flush>|<arg|body>>>>
</float>>>

and what I get is is this:

So obviously, the entire footnote float has been shifted by 1.27cm to the left. But this is not what I want. Does anyone know how to change the code such that the footnotes look formatted as in the first example.

Cheers, Tilda

I think you can do it with tables.

Here are macros that show the idea. The first macro defines a table that formats the footnote and the second uses it replacing the default render-footnote*. You need to adjust the sizes yourself and also remove the cell borders which are there to make the table evident; but that I think you can do.

I obtained them by trial and error and I do not know if the macros to obtain the linking of the footnote to the text … and all other pieces of code the function of which I do not know are correct. Other errors are possible too :wink:

The format of the footnote looks like the one in your example and one can jump to the footnote from the text.

<assign|footnote-table|<\macro|nr|body|sym>
  <\wide-tabular>
    <tformat|<cwith|1|1|1|1|cell-width|1em>|<cwith|1|1|1|1|cell-hmode|exact>|<cwith|1|1|1|-1|cell-tborder|1ln>|<cwith|1|1|1|-1|cell-bborder|1ln>|<cwith|1|1|1|-1|cell-lborder|1ln>|<cwith|1|1|1|-1|cell-rborder|1ln>|<table|<row|<\cell>
      <locus|<id|<hard-id|<arg|body>>>|<link|hyperlink|<id|<hard-id|<arg|body>>>|<url|<merge|#footnr-|<arg|nr>>>>|<arg|sym>><footnote-sep>
    </cell>|<\cell>
      <surround||<set-binding|<merge|footnote-|<arg|nr>>|<value|the-label>|body><right-flush>|<arg|body>>
    </cell>>>>
  </wide-tabular>
</macro>>


<assign|render-footnote*|<macro|sym|nr|body|<\float|footnote|>
  <smaller|<\with|par-mode|justify|par-left|0cm|par-right|0cm|font-shape|right|dummy|<value|page-fnote-sep>|dummy|<value|page-fnote-barlen>>
    <footnote-table|<arg|nr>|<arg|body>|<arg|sym>>
  </with>>
</float>>>
1 Like

Dear Giovanni,

thanks for your fast reply and your smart solution making use of a wide-tabular environment for placing the various parts of a footnote into.

It’s been indeed quite straightforward to adjust the formatting to my needs, and so far I’ve not encountered any real issues:

As these footnotes are now tables this may have an impact on TeXmacs’ page-breaking mechanism and result in expanded vertical spacing between the footnotes. But I haven’t extensively tested yet.

Cheers, Tilda

I had not thought about this. I tested the default footnotes. A footnote is kept on a page even if it is too long (it flows over the bottom border), but a second footnote can be put on a different page if space isn’t enough. I did not yet look at the page breaking with tables in footnotes.

Edit: I did not check the vertical spacing.

PS: tables are the standard TeXmacs way to organize content on the page; see e.g. figures