who made it
the format version of the file
whether an edit changes the file from the version as read
the icon, as the file holds it
the name shown
how it is laid out
its version, as the file holds it
the categories it is listed under
the constants its items use, as the file holds them
every key the core does not read
what it draws, as the file holds it
its labels
what it draws on a page of size
Constants, groups, repeats, paths and text are worked out for the page,
and the marks come back in the page's pixels in the order to draw them. A
page starts the screen's size and grows taller as it is scrolled down, as
PageSize.scrolled gives it. The template's sizes, templateWidth,
templateHeight and paperOriginX, are the screen's, as the tablet works
them out, while its repeats fill the whole page. A page records its
screen's size, as Page.paperSize, but not how far it has grown.
The size's width by height is the screen as the page stands: for a
page of a landscape notebook, one whose .content orientation is
"landscape", pass Page.paperSize swapped, its height then its width,
since the tablet turns the whole notebook. The tablet lays a template out on the upright screen
whichever way the page stands, and whatever orientation the template gives
itself: templateWidth is the screen's shorter side. On a page wider than
that the drawing is moved right to the middle, by half of how much wider it
is, and its repeats fill the wider page.
rmapi does not draw the marks. To draw them as the tablet does, set text
in IBM Plex Sans, bold where bold is set:
it is free under the Open Font License, and near reMarkable Sans, whose
widths place the text. Stroke shapes with square (projecting) caps and
bevel joins (lineCap = "square", lineJoin = "bevel" on a canvas),
dashed by dash; a strokeWidth of 0 is the thinnest line the screen can
draw. Hairlines come out 0.5 pixels wide in gray #c0c0c0.
LayoutError if the template cannot be worked out
put this file's edits on newer, a copy read since, and hold that,
returning the keys both changed to different values, as
Metadata.merge does
remove a key of the file: a key the core reads clears its field, or sets it to what a file without the key reads it as
Warning: as for setExtra, this can leave the file at odds with itself.
Prefer the field's own setter.
ValidationError if key names a field the file must
have; the file is left as it was
set who made it
set the categories it is listed under
set a key of the file: a key the core reads sets its field, and any other
is kept in extra
Warning: a key the core reads is written as given, past the rules its own
setter keeps, so it can leave the file at odds with itself, such as a
pageCount that does not count the pages listed. Prefer the field's own
setter, such as setPages for the page
keys.
ValidationError if value is not a value of the field
key names; the file is left as it was
set the icon
set its labels, or remove them
rename it
set its version
the screens it is made for, as the file holds them
the file with its edits made, as the account holds it
the file with its edits made, as JSON
StaticbuiltStaticcreatea new template, with nothing drawn
Staticfromread a .template from what toJSON gave, or a copy of it, as read
from the account at at; the core checks every field
Staticparseread a .template from its bytes, read from the account at at
a template's
.template: what it draws