2.3.4. Signature Marks (layout.elements.mark)

class layout.elements.mark.SignatureMark(index, total, width=1, color=(0, 0, 0), margin=0.1)

Bases: layout.managers.root.LayoutElement

A signature mark.

Signature marks appear on the ouside of the fold of a set of pages gathered into a signature for bookbinding. The signature mark allows the binder to quickly collate the signatures and to quickly see if any are in the wrong position.

This signature mark should be overlaid on the first page of each signature. It appears in the left-hand margin. Note that the signature mark is drawn outside of the rendering rectangle it is given, so that it can be seen across the eventual fold. This means that if you render the mark in a manager that crops its contents, the cropped part of the mark will be lost, and its functionality might be compromised.

Normally you don’t deal with these marks manually, they are added for you by the page imposition system in layout.pages.imposition.

Historically signature marks were not placed in the spine, but in the foot of the first page of each signature and were numbered.

Arguments:

index
Which signature in the book is this?
total
How many signatures are there in total?
width
How wide should the mark be (the default, 1pt is usually fine).
color
What color should the mark be (default (0,0,0) black).
margin
How much of the spine at the top and bottm should be left unmarked (this figure is given as a proportion). This should be a fair size (0.1, by default), to stop the mark being visible when looking at the head or foot of the finished book.
get_minimum_size(data)

How small can the element be? Should return a Point.

render(rectangle, data)

Draws the signature mark.

Note that this draws OUTSIDE the rectangle we’re given. If cropping is involved, then this obviously won’t work.