Sidenote placement

Sidenotes are rendered in the order in which they are processed and displayed within rectangular sidenote blocks that sit to the left or right of the main text columns. The point at which the sidenote is declared in the main data stream is called the sidenote reference point. It is possible for more that one sidenote to be declared from the same sidenote reference point.

When sidenotes are positioned on a page, they are aligned with a sidenote anchor line. By default, the sidenote anchor line will correspond to the line from which the sidenote was referenced, but you can use the <note-properties/> directive to align a sidenote with the first line of the paragraph in which it is declared.

When more than one sidenote shares a common reference point, the first line of the first sidenote referenced from any line will always align with the sidenote anchor line.

If necessary, the sidenote anchor line will be vertically repositioned to prevent an overlap with the content of a previously rendered sidenote. In the special case where more than one sidenote shares the same anchor line, the first sidenote aligns with the anchor line and the remaining sidenotes are positioned immediately below the previous sidenote.

The alignment of a sidenote and the sidenote anchor line is calculated using the vertical depth of the sidenote anchor line and the vertical depth of the first sidenote line. The vertical depth of these lines is determined by the line leading and depth of any objects — text, images, or rules — within those lines. You can use the <note-properties/> command to align a sidenote with the top or baseline of the sidenote anchor line.

Where sidenotes share a common reference point, you can vary the gap between each sidenote by adjusting the inter-paragraph spacing.