Forum How do I...?

Footnotes again ;) how is the layout

velten
Hy, I had quite some difficulties to find out how to make space for the footnotes.
I have:
	@page {
		size: 210mm 297mm;
		margin: 20mm 20mm 10mm 20mm;
		padding: 0;
		@bottom {
			content: counter(page) " / " counter(pages);
		}
	}

further more I have:
	body {
		border: 1mm solid #CCC;
		width:170mm;
		height: 255mm;
	}


I appears as the footnotes are within the page but outside of the body. Would it be possible to create a cheatsheet which shows where the different elements (like bottom, footnotes, page, html, body) are?

When I have 3 footnotes on a page the first will render on the same page and the second and third are rendering on a blank page. Is it possible to render them instead on the following pages?
mikeday
This document may help clarify things:
<html>
<head>
<style>
@page {
    background: yellow;
    border: solid red thin;
    @top {
	content: "Top Margin Box";
	background: orange
    }
    @bottom {
	content: "Bottom Margin Box";
	background: orange
    }
    @footnotes {
	background: purple
    }
}

body {
    background: rgb(255,255,224)
}

.fn { float: footnote }
</style>
</head>
<body>
<h1>Page Body</h1>
<p>
Paragraph with a footnote<span class="fn">@footnotes area</span>.
</p>
<p>
Paragraph with a footnote<span class="fn">@footnotes area</span>.
</p>
<p>
Paragraph with a footnote<span class="fn">@footnotes area</span>.
</p>
</body>
</html>

I would suggest not applying the "height" property to body, as it probably isn't necessary, and may have unexpected effects on the layout.
velten
Is it possible to have a border up to, but not including the footnotes?
mikeday
Not in Prince 8.1, but in Prince 9 you will be able to absolutely position the @footnotes area to your preferred location with a specified size, which may be what you need.
velten
Sounds good. Looking forward to it.
I've done my thesis with prince and I'm happy that it was possible to stick to html+css.
mikeday
Prince 9 is now available for download, so you can try this out! The documentation is not ready yet, but it's basically like this:
@page {
    @footnotes {
        position: absolute;
        left: ...; top: ...; width: ...; height: ...
    }
}

jamespaden
Mike,

Just spent 30 minutes banging my head on footnote layout before I saw this comment and realize I could absolutely position the box. Might be worth noting that in the documentation somewhere. Can other page regions be absolutely positioned? Thanks!

Try DocRaptor - PrinceXML web service and official PrinceXML partner

csant
Might be worth noting that in the documentation somewhere.


It says here:

By default, the @footnote area is at the bottom of the page. However, Prince allows to position the area in different places


and gives an example of absolute positioning.

As for other regions, see here:

The @footnote area can be positioned other than its default position (see Styling and behavior of footnotes and Sidenotes). All other page regions cannot be moved - their position is defined by the page margins.
jamespaden
Ah, my fault! 🤦‍♂️

I was Googling and accidentally got on the Prince 11 docs (https://www.princexml.com/doc/11/paged/#page-regions, https://www.princexml.com/doc/11/footnotes/)


Thanks, csant!

Try DocRaptor - PrinceXML web service and official PrinceXML partner

Edited by jamespaden