Content behind canberead.com/elements. Based on this translation.
Array of Section for each book.
Section is an object of following properties.
idunique identifier across all books. e.g.1.47,10.d1,10.28-lemII.titlee.g. 'Proposition 47', 'Lemma II'.proseplain text with{...}markup for references.{[a-zA-Z]+ [a-z]+( [a-zA-Z])?}should match the references- e.g.
{oA line},{ABC arc O},{DEFGHK given}.
pointsposition of points. Each point is an array of 2 or 3 numbers.- e.g.
{'A': [315.0, 515.0], ...}
- e.g.
lettersthe position of the letter drawn on figure relative to the position of the point above.- Array of two numbers, radial direction(Math.PI/4) and distance.
- e.g.
{ 'A': [1], 'B': [5], 'L': [3, 3] }forAis above,Bbelow andLto the left. - Second number in L is for leaving more space.
shapesarray of shapes. Each shape is itself an array.- First element of the shape array is the name of a primitive.
- Rest are points to be taken as arguments to the primitive.
- Primitive should be one of
point,line,polygon,circle,arc,arcc(ccw arc),angle,curve,gnomon(arcwith dashed line). - final optional element of the array can be an object with the following properties:
{ layer: 'low' }for shapes that are closer to the background color. As in Proposition 13.16{ dashed: true }for dashed lines and polygons. As in 3.8 and 10.32-lem
- *
polygonlwhen the polygon is referenced by two diagonal corners in prose, all the corners are found through this map. - *
givenwhen the reference in prose is not a primitive but should be an array of primitives, this object maps to an array similar toshapesabove.
polygonl and given are optional.
Section can contain a figures array. Each element of the array would be made up of separate points, letters and shapes. Each figure sharing the same canvas but possibly highlighted independently. Prose would then contain {figure 1} for highlighting references on just the first figure, {figure 2} for highlighting the second figure or {figure 0} for highlight all the figures at each reference. Occurence of {figure ..} should be at the start of a sentence and marks all the references until another occurence. See Proposition 3.36 for the motivation.