I applied the basic page layout algorithm to place the footnote. Primarily:
- The markup of the line of the main text.
- If it contains links to footnotes, lay out the footnotes in rows.
- Go to 1.
At each step, I check if the overall height (body text + footnote text + space) exceeds the page height. If so, I delete the most recent laid out line and the page is complete.
My question is: How can I deal with a situation where the body text is in two columns?
Essentially, I would need to know the total permissible height of the body text in advance in order to lay out the columns correctly, but it is impossible to find out until I know the height of the footnote text.
I also canβt just take the accumulated height of the text lines of the body and divide by 2 due to changes in line height, line spacing, paragraph spacing, etc.
source
share