JIIX format reference

Reference of the JSON Interactive Ink eXchange format (JIIX) version 2.

Content

JIIX is an exchange format to export, share and re-import the internal semantics of the Interactive Ink model.

As such, it is designed to host information about:

  • Content - strokes, glyphs and graphical primitives
  • Semantic interpretation of the content, including lists
  • Style information - decorations, color, width, font, etc.

When exporting JIIX from iink SDK, depending on the use case, you may sometimes want to only retrieve part of this information. This is managed at configuration level, via the following keys:

  • export.jiix.strokes - Export ink strokes
  • export.jiix.glyphs - Export converted glyphs
  • export.jiix.primitives - Export shape primitives (lines, circles, etc.)
  • export.jiix.style - Export detailed styling information (color, width, font, etc.)
  • export.jiix.text.chars - Export detailed information about the characters in the text interpretation
  • export.jiix.text.words - Export detailed information about the words in the text interpretation

For more information about these parameters, including default values, refer to the

configuration reference.

Versioning

The version of the format that the current document conforms to is given by the version property of the root of the JSON document (as the root of the document corresponds to the root block of the exposed content block hierarchy, the version property belongs to this root block).

  • Purpose: Indicate the version of the JIIX format.
  • Content: A string identifying the current iteration of the format
  • Note: This property was added with iink SDK 1.3. Previous JIIX document do not have this property.

For example, if the root block is a “Text” block, we will have something like:

{
 "version": "2",
 "type": "Text",
 "bounding-box": { ... },
 "label": "Hello world!",
 "words": [ ... ],
 "id": "MainBlock"
}

Unit system

Units are not explicitly provided in a JIIX document. They shall be understood as model units, that is to say millimeters. The actual rendering of a JIIX document on the screen will then depend on the dpi and any other parameter (zoom, offset) used to configure the renderer.

Structure

Block hierarchy

JIIX documents are organized as a hierarchy of JSON objects (called “Blocks” in this page) that mirrors the block hierarchy of a content part. Each object has a specific type string property identifying it as a text block, a diagram block, a math node, etc. and defining the block semantics.

For example, a simple diagram may aggregate a text label and a rectangular node:

{
 "type": "Diagram",
 "elements": [ {
   "type": "Text",
   ...
  }, {
   "type": "Node",
   "kind": "rectangle",
   ...
  } ],
 ...
}

This semantics, in turn defines how sub-blocks are aggregated. For example :

  • A Diagram block will host an array of “Diagram Item” blocks under its elements property.
  • A Math block will host an array of “Math Node” blocks under its expressions property.
  • A generic Container block will host its sub-blocks under a children property.
To know the precise semantics of a given type of block, please refer to its detailed description below.

Properties common to blocks

Whatever their types, all blocks share the following common properties:

  • id
    • Purpose: Provide a unique reference for the block in the context of the document.
    • Content: A string.
    • Example: "id": "3544"
  • bounding-box
    • Purpose: Describe the extent of the block.
    • Content: x, y, width, height - 4 numerical properties defining a rectangle which top-left corner is positioned at coordinates (x, y) and of size (width, height).

    • Configuration: Present in the JIIX export when export.jiix.bounding-box configuration is true.

For example, a simple drawing block can be represented as:

{
 "type": "Drawing",
 "id": "MainBlock",
 "bounding-box": {
  "x": 20.43125,
  "y": 31.272942,
  "width": 9.9375,
  "height": 8.9725456
 },
 ...
}

Other potential properties depend on the type of the block. Refer to the “blocks” section for more details.

Block content description

Block content is described using items, which represent what is actually visible when rendering the model.

Items

Items are used to describe the content of blocks in terms of ink, glyphs or shape primitives.

Like blocks, items share common properties:

  • type
    • Purpose: Provide the type of the item.
    • Content: stroke, line, arc or glyph
  • id
    • Purpose: Provide a unique reference for the item in the context of the document.
    • Content: A string.
    • Example: "id": "4432"

Stroke item

A stroke item represents a standalone portion of ink, that is to say the trajectory of a writing tool between a pointer down and the corresponding pointer up.

It has the following specific properties:

  • timestamp
    • Purpose: Give the precise date and time of the pointer down
    • Example: "2018-11-28 09:31:43.893000"
  • X
    • Purpose: Give the x coordinates of the different points of the stroke, ordered from pointer down to pointer up.
    • Content: An array of numbers.
  • Y
    • Purpose: Give the y coordinates of the different points of the stroke, ordered from pointer down to pointer up.
    • Content: An array of numbers.
  • F
    • Purpose: Give the force (a.k.a pressure) of the different points of the stroke, ordered from pointer down to pointer up.
    • Content: An array of numbers.
  • T
    • Purpose: Give the time offset of the different points of the stroke in ms relatively to the timestamp of the stroke, ordered from pointer down to pointer up.
    • Content: An array of numbers.

Example:

{
 "type": "stroke",
 "id": "0000000001002300ff00",
 "timestamp": "2018-11-28 09:31:43.893000",
 "X": [ 21.43125, 21.629688, 22.026562, 22.621876, 23.614063, 24.606251, 25.003124, 25.796875,
  26.789062, 26.987499, 27.582813, 28.178125, 28.376562, 28.773438, 28.971874, 29.170313,
  29.36875, 29.36875 ],
 "Y": [ 39.245487, 39.046272, 38.448627, 37.651764, 36.8549, 35.858822, 35.460392, 34.663528,
  33.866665, 33.66745, 33.468235, 32.870586, 32.671371, 32.671371, 32.472157, 32.472157,
  32.272942, 32.272942 ],
 "F": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
 "T": [ 0, 168, 176, 187, 196, 206, 215, 224, 232, 241, 249, 258, 266, 274, 276, 289, 296, 305 ]
}
The number of elements in X, Y, T and F must be strictly identical.

Line item

A line item represents a converted line primitive, for instance the edge of a polygon.

It has the following specific properties:

  • timestamp
    • Purpose: Timestamp of the stroke that was converted into this primitive.
    • Example: "2018-11-29 10:03:05.980000"
  • x1
    • Purpose: Give the x coordinates of the first point defining the line.
    • Content: A number.
  • y1
    • Purpose: Give the y coordinates of the first point defining the line.
    • Content: A number.
  • x2
    • Purpose: Give the x coordinates of the second point defining the line.
    • Content: A number.
  • y2
    • Purpose: Give the y coordinates of the second point defining the line.
    • Content: A number.

Example:

{
 "type": "line",
 "id": "00001d0001000300ff00",
 "timestamp": "2018-11-29 10:03:05.980000",
 "x1": 67.351799,
 "y1": 72.70636,
 "x2": 74.252617,
 "y2": 60.756866
}

Arc item

An arc item represents a converted arc primitive, for instance a curved connector in a diagram or a portion of an ellipse.

It has the following specific properties:

  • timestamp
    • Purpose: Timestamp of the stroke that was converted into this primitive.
    • Example: "2018-11-29 10:03:05.980000"
  • cx
    • Purpose: Give the x coordinates of the center.
    • Content: A number.
  • cy
    • Purpose: Give the y coordinates of the center.
    • Content: A number.
  • rx
    • Purpose: Give the x-axis or semi-major radius.
    • Content: A number (must be positive).
  • ry
    • Purpose: Give the y-axis or semi-minor radius.
    • Content: A number (must be positive).
  • phi
    • Purpose: Give the x-axis rotation angle.
    • Content: A number.
  • startAngle
    • Purpose: Give the start angle (prior to stretch and rotate).
    • Content: A number.
  • sweepAngle
    • Purpose: Give the sweep angle (prior to stretch and rotate).
    • Content: A number.

Example:

{
 "type": "arc",
 "id": "00001c0001008100ff00",
 "timestamp": "2018-11-29 10:03:02.108000",
 "cx": 34.332874,
 "cy": 71.93309,
 "rx": 9.3729343,
 "ry": 9.3729343,
 "phi": 0,
 "startAngle": 0,
 "sweepAngle": 6.2831855
}

Glyph item

A glyph item represents a converted typeset character.

It has the following specific properties:

  • timestamp
    • Purpose: Timestamp of the stroke that was converted into this glyph.
    • Example: "2018-11-28 13:37:03.514000"
  • label
    • Purpose: Provide the character represented by the glyph.
    • Example: "B"
  • baseline
    • Purpose: Provide the position of the baseline.
    • Content: A number.
    • Note: Optional (not used for the glyphs present in a math context).
  • x-height
    • Purpose: Provide the x height.
    • Content: A number.
    • Note: Optional (not used for the glyphs present in a math context).
  • square-root-ratio
    • Purpose: Indicate the horizontal ratio between the size of the glyph and the “V” shape part of the square root.
    • Content: A number.
    • Note: Only for square roots.
  • left-side-bearing
    • Purpose: Indicate the glyph left side bearing.
    • Content: A number.
  • right-side-bearing
    • Purpose: Indicate the glyph right side bearing.
    • Content: A number.

Example:

{
 "type": "glyph",
 "id": "00003c0001000700ff00",
 "timestamp": "2018-11-28 13:37:03.514000",
 "bounding-box": { ... },
 "label": "B",
 "baseline": 1.0000001,
 "x-height": 0.73378384,
 "left-side-bearing": -0.21175167,
 "right-side-bearing": 1.0937916
}

Text interpretation

Text interpreted by iink SDK is represented by word and character objects as part of a Text block.

Word object

A word object represents the recognition of a word made by the MyScript engine. Note that to get such interpretation in JIIX export, your need to set the export.jiix.text.words configuration option to true.

It has the following properties:

  • label
    • Purpose: Provide the top recognition result associated with this word.
    • Content: A string.
    • Example: "label": "hello"
  • candidates
    • Purpose: Provide the list of recognition candidates associated with this word.
    • Content: An array of strings.
    • Example: "candidates": [ "hello", "Hello", "hellos", "hella", "bello" ]
  • bounding-box
    • Purpose: Describe the extent of the word.
    • Content: x, y, width, height - 4 numerical properties defining a rectangle which top-left corner is positioned at coordinates (x, y) and of size (width, height).

    • Configuration: Present in the JIIX export when export.jiix.bounding-box configuration is true.
  • items
    • Purpose: Host ink and/or glyphs composing the word.
    • Content: An array of stroke and/or glyph items.

    • Configuration: Strokes are only present in JIIX export when export.jiix.strokes is configured to true, glyphs are only present when export.jiix.glyphs is configured to true.
  • first-char
    • Purpose: Provide the index of the first character contained in this word.
    • Content: An integer, representing the index of a character object in the Text block.
    • Example: "first-char": 24

    • Configuration: This property is only present in the JIIX export when export.jiix.text.chars or export.jiix.style are configured to true.
  • last-char
    • Purpose: Provide the index of the last character contained in this word.
    • Content: An integer, representing the index of a character object in the Text block.
    • Example: "last-char": 29

    • Configuration: This property is only present in the JIIX export when export.jiix.text.chars is configured to true.

Example:

{
 "label": "hello",
 "candidates": [ "hello", "Hello", "hella", "bello", "Lello" ],
 "first-char": 0,
 "last-char": 4,
 "bounding-box": { ... },
 "items": [ ... ]
}

Character object

A character object represents the recognition of a character made by the MyScript engine. Note that to get such interpretation in JIIX export, your need to set the export.jiix.text.chars configuration option to true.

It has the following properties:

  • label
    • Purpose: Provide the recognition result associated with this char.
    • Content: A string.
    • Example: "label": "h"
  • grid
    • Purpose: Provide the highlight area associated with this char.
    • Content: An array of 4 points, each containing x and y floating points coordinates.
    • Example: "grid": [ {"x": 1, "y": 5}, {"x": 3.5, "y": 5}, {"x": 3.5, "y": 10}, {"x": 1, "y": 10} ]
  • bounding-box
    • Purpose: Describe the extent of the character.
    • Content: x, y, width, height - 4 numerical properties defining a rectangle which top-left corner is positioned at coordinates (x, y) and of size (width, height).

    • Configuration: Present in the JIIX export when export.jiix.bounding-box configuration is true.
  • items
    • Purpose: Host ink and/or glyphs composing the character.
    • Content: An array of stroke and/or glyph items.

    • Configuration: Strokes are only present in JIIX export when export.jiix.strokes is configured to true, glyphs are only present when export.jiix.glyphs is configured to true.
  • word
    • Purpose: Provide the index of the word that contains this char.
    • Content: An integer.
    • Example: "word": 10

    • Configuration: This property is only present in the JIIX export when export.jiix.text.words is configured to true.

Example:

{
  "label": "h",
  "word": 0,
  "grid": [ {
    "x": 18.875834,
    "y": 31.736748
   }, {
    "x": 25.118258,
    "y": 31.736748
   }, {
    "x": 25.118258,
    "y": 44.957951
   }, {
    "x": 18.875834,
    "y": 44.957951
   } ],
  "bounding-box": { ... },
  "items": [ ... ]
 }

Style

The JIIX format can contain styling information. These encompass:

  • CSS properties that you explicitly assign to the pen (dynamic styles)
  • Style classes that you assign to the pen (pen style classes)
  • Classes and styles automatically set by iink SDK when decorations are detected.
Themes, that are local to your editor, will not be exported.

If you are exporting content, you need to set the export.jiix.style configuration key to true to get style information.

Item span styling

Blocks like Drawing and text/non-text raw content items can be seen as an ordered collection of strokes. Such a collection can be styled via the definition of “item spans”, each span associating a specific style to a range of items.

Item spans have the following properties:

  • first-item
    • Purpose: Give the index of the first item in the span.
    • Content: A number (positive or null).
  • last-item
    • Purpose: Give the index of the last item in the span.
    • Content: A number (positive or null).
  • class
    • Purpose: Provide the name of the CSS class attached to the items in the span.
    • Content: A string.
    • Example: "myClass"
  • style
    • Purpose: Provide inline CSS style that “overrides” any default style.
    • Content: A string.
    • Example: "color: #FF324233"

For example, if we write 2 strokes with pen style class set to “greenThickPen” then 2 more strokes with no pen style class but pen style set to “color : #FF324233”, we obtain something like:

{
  "first-item": 0,
  "last-item": 1,
  "class": "greenThickPen"
}

and

{
 "first-item": 2,
 "last-item": 3,
 "style": "color: #FF324233"
}

Note that an item may be contain both class and style indications, or none of them if default styling applies.

Text span styling

Text blocks can be seen as an ordered collection of characters. Such a collection can be styled via the definition of “character spans”, each span associating a specific style to a range of characters.

Item spans have the following properties:

  • first-char
    • Purpose: Give the index in the text of the first character in the span.
    • Content: A number (positive or null).
  • last-char
    • Purpose: Give the index in the text of the last character in the span.
    • Content: A number (positive or null).
  • class
    • Purpose: Provide the name of the CSS class attached to the characters in the span.
    • Content: A string.
    • Example: "myClass"
  • style
    • Purpose: Provide inline CSS style that “overrides” any default style.
    • Content: A string.
    • Example: "color: #FF324233"

For example, text underlined by a gesture may get the following style:

{
 "first-char": 0,
 "last-char": 12,
 "class": "text-emphasis1",
 "style": "color: #000000FF; -myscript-text-decoration-color: #000000FF; -myscript-text-decoration-background-color: #FFED2666"
}

Nodes styling

Blocks like math and diagram nodes, as well as diagram connectors are independently styled.

They can directly have the following properties:

  • class
    • Purpose: Provide the name of the CSS class attached to the node.
    • Content: A string.
    • Example: "myClass"
  • style
    • Purpose: Provide inline CSS style that “overrides” any default style for the node.
    • Content: A string.
    • Example: "color: #FF324233"

For example, a math node can be styled as follows:

{
 "type": "number",
 "id": "math/170",
 "label": "3",
 "value": 3,
 "items": [ ... ],
 "bounding-box": { ... },
 "class": "greenThickPen"
}

Blocks

This section lists all available blocks of the hierarchy, their properties and particularities, if any.

Container block

A block of type Container groups children blocks together.

It has the following specific property:

  • children
    • Purpose: Provide the list of blocks within this container block.
    • Content: An array of blocks.

For example, in the JIIX export of a “Text Document” part composed of two paragraphs of text, each paragraph will correspond to a text block and both will be grouped as the children of a same container block:

{
 "type": "Container",
 "id": "2135",
 "bounding-box": { ... },
 "children": [ {
   "type": "Text",
   ...
  }, {
   "type": "Text",
   ...
  } ],
 ...
}
No assumption is made about the type of children blocks.

Diagram block

A block of type Diagram groups together the different internal blocks of an individual diagram.

It has the following specific property:

  • elements
    • Purpose: Provide an array of recognized diagram items.
    • Content: An array of Diagram item blocks.

For example, a diagram may be composed of a Text label and of a diagram Node corresponding to a rectangle:

{
 "type": "Diagram",
 "id": "9824",
 "bounding-box": { ... },
 "elements": [ {
   "type": "Text",
   ...
  }, {
   "type": "Node",
   "kind": "rectangle",
   ...
  } ],
 ...
}

Diagram item blocks

Diagram item blocks collectively form a family of blocks of different types describing the semantic structure of a diagram: connectors, text blocks, geometric shapes, etc. There is no actual “Diagram Item” type.

These blocks share the following common properties:

  • type
    • Purpose: Describe the type of diagram item.
    • Content: Node, Edge, Polyedge or Text
  • parent
    • Purpose: Provide the diagram item’s parent item (if any).
    • Content: A diagram item numerical id.
    • Example: "parent": 38,
  • items
    • Purpose: Host ink and/or converted shape primitives composing the item.
    • Content: An array of stroke, line and/or arc items.
    • Example: See below

    • Configuration: Strokes are only present in JIIX export when export.jiix.strokes is configured to true, lines and arcs are only present when export.jiix.primitives is configured to true.

Diagram nodes and connectors (i.e. with type node, edge or polyedge) will get the following styling classes:

  • class
    • Purpose: Provide the name of the CSS class attached to the node.
    • Content: A string.
    • Example: "myClass"

    • Configuration: Style is only present in then JIIX export when export.jiix.style is configured to true.
  • style
    • Purpose: Provide inline CSS style that “overrides” any default style for the node.
    • Content: A string.
    • Example: "color: #FF324233"

    • Configuration: Style is only present in then JIIX export when export.jiix.style is configured to true.

Example:

{
 "id": 97,
 "type": "Node", 
 "parent": 12,
 "bounding-box": { ... },
 "items": [ ... ],
 ... specific properties ...
}
Although diagram item blocks have an id property like other blocks, their identifier is a number and not a string.

➤ Diagram Node block

A diagram item of type Node is associated with a particular shape, an optional label, and may host child items. This is modeled by the following properties:

  • kind
    • Purpose: Describe the sub-type of the diagram item.
    • Content: rectangle, rhombus, polygon, circle, ellipse or doodle.
  • label
    • Purpose: Provide the id of the diagram item of type Text that describes the label associated with the item.
    • Content: A diagram item numerical id.
    • Example: "label": 24
  • children
    • Purpose: Provide an array of child diagram items associated with the item.
    • Content: An array of diagram items numerical ids.
    • Example: "children": [ 48, 62 ]

Depending on its “kind”, the item will have specific properties:

  • If "kind": "rectangle"
    • x - X position of the left edge of the rectangle.
    • y - Y position of the top edge of the rectangle.
    • width - Width of the rectangle.
    • height - Height of the rectangle.
  • If "kind": "rhombus"
    • points - Array containing the 4 {x, y} points describing the rhombus.
  • If "kind": "polygon"
    • points - Array of {x, y} points describing the polygon.
  • If "kind": "circle"
    • cx - X position of the center of the circle.
    • cy - Y position of the center of the circle.
    • r - Radius of the circle.
  • If "kind": "ellipse" : an axis aligned ellipse.
    • cx - X position of the center of the ellipse.
    • cy - Y position of the center of the ellipse.
    • rx - X radius of the ellipse.
    • ry - Y radius of the ellipse.
  • If "kind": "doodle"
    • No specific property describes a doodle.
    • Note: As doodles are not converted, items will never contain shape primitives.

For example, the following node represents a rectangle in a diagram, associated with a text label:

{
 "type": "Node",
 "kind": "rectangle",
 "label": 24,
 "children": [ 64, 72, 78 ],
 "id": 97,
 "bounding-box": { ... },
 "items": [ ... ],
 "x": 11.43108,
 "y": 21.065617,
 "width": 54.700756,
 "height": 18.451683
}

➤ Diagram Edge block

A diagram item of type Edge connects other diagram items.

  • kind
    • Purpose: Describe the sub-type of connector.
    • Content: line or arc.
  • children
    • Purpose: Provide an array of children diagram items associated with the item.
    • Content: An array of diagram items numerical ids.
    • Example: "children": [ 48, 62 ]
  • connected
    • Purpose: Provide the list of the diagram items connected by this edge.
    • Content: An array of diagram items numerical ids.
    • Example: "connected": [ 11, 62 ]
  • ports
    • Purpose: Provide the list of connection ports associated with this edge.
    • Content: A list of ports numerical ids.
    • Example: "ports": [ 0, 1 ]

Example of a “straight” edge:

{
 "type": "Edge",
 "kind": "line",
 "connected": [ 18, 30 ],
 "ports": [ 1, 0 ],
 "id": 8,
 "bounding-box": { ... },
 "items": [ ... ],
 "x1": 20.240625,
 "y1": 45.161953,
 "x2": 58.34063,
 "y2": 27.649166
}

Note that as a “line” connector, the edge includes x1, y1, x2 and y2 properties, defined the exact same way than in the case of line items.

Example of a “curved” edge:

{
 "type": "Edge",
 "kind": "arc",
 "id": 40,
 "bounding-box": { ... },
 "items": [ ... ],
 "connected": [ 30, 18 ],
 "ports": [ 0, 1 ],
 "cx": 47.004948,
 "cy": 50.038963,
 "rx": 33.323929,
 "ry": 33.323929,
 "phi": 0.0051990449,
 "startAngle": -2.9348991,
 "sweepAngle": 1.8149548
}

Note that as an “arc” connector, the edge includes cx, cy, rx, ry, phi, startAngle and sweepAngle properties, defined the exact same way than in the case of arc items.

➤ Diagram Polyedge block

A diagram item of type Polyedge connects other diagram items via several other edges. It is associated with the following properties:

  • connected
    • Purpose: Provide the list of the diagram items connected by this polyedge.
    • Content: An array of diagram items numerical ids.
    • Example: "connected": [ 11, 62 ]
  • edges
    • Purpose: Provide the list of edges composing this polyedge.
    • Content: A list of diagram edge items.

Example of a polyedge gathering three edges together:

{
 "type": "Edge",
 "kind": "polyedge",
 "id": 65,
 "connected": [ 19, 41, 8 ],
 "edges": [ {
   "type": "Edge",
   "kind": "line",
   ...
  }, {
   "type": "Edge",
   "kind": "line",
   ...
  }, {
   "type": "Edge",
   "kind": "line",
   ...
  } ]
}

➤ Diagram Text block

A diagram item of type Text combines the properties of a diagram item and those of a Text Block. It is styled using text spans.

Drawing block

A drawing block gathers raw digital ink.

It has the following specific properties:

  • items
    • Purpose: Host ink composing the block.
    • Content: An array of strokes items.

    • Configuration: Strokes are present in JIIX export when export.jiix.strokes is configured to true.
  • spans
    • Purpose: Give a list of item spans providing styling information.
    • Content: An array of item span objects.

    • Configuration: Style is only present in then JIIX export when export.jiix.style is configured to true.

Example:

{
 "type": "Drawing",
 "id": "7635",
 "bounding-box": { ... },
 "items": [ ... ],
 "spans": [ ... ]
}

Math block

A block of type Math is associated with the following properties:

  • expressions

    • Purpose: Provide an array of recognized Math expressions.
    • Content: An array of math nodes.
{
 "type": "Math",
 "id": "4529",
 "bounding-box": { ... },
 "expressions": [ ... ]
}

Math node block

A math node block describes a portion of a mathematical expression. Depending on the math node type, a math node may contains other math nodes, in the operands property.

  • type
    • Purpose: Indicate the type of the node.
    • Content: A string.
    • Example: +, -, number, =, fraction, square root, fence, symbol, underscript, matrix
  • label
    • Purpose: Indicate the label associated with the node, when it is different from type.
    • Content: A string.
    • Example: 2.453..., , θ, dx
  • operands
    • Purpose: Provide the operands associated with the nodes, if any.
    • Content: An array of math nodes.
  • generated
    • Purpose: Signals a node that was added by iink SDK solver, when not provided this properties is considered false.
    • Content: A boolean.
  • value
    • Purpose: Provide the numerical value associated to a given node, when not provided indicates that the iink SDK solver could not solves this particular node.
    • Content: A number.
  • items
    • Purpose: Host ink and/or glyphs composing the node.
    • Content: An array of stroke and/or glyph items.
    • Example: See below

    • Configuration: Strokes are only present in JIIX export when export.jiix.strokes is configured to true, glyphs are only present when export.jiix.glyphs is configured to true.
  • class
    • Purpose: Provide the name of the CSS class attached to the node.
    • Content: A string.
    • Example: "myClass"

    • Configuration: Style is only present in then JIIX export when export.jiix.style is configured to true.
  • style
    • Purpose: Provide inline CSS style that “overrides” any default style for the node.
    • Content: A string.
    • Example: "color: #FF324233"

    • Configuration: Style is only present in then JIIX export when export.jiix.style is configured to true.

Example:

{
 "type": "+",
 "id": "math/34",
 "items": [ ... ],
 "bounding-box": { ... },
 "operands": [ ... ]
}

➤ Fence math block

Math nodes of type fence have the following specific properties:

  • open symbol
    • Purpose: Indicate the opening symbol of the fence. If this property is not set, indicates that no opening symbol was recognized.
    • Content: A string.
    • Example: (, [, {
  • close symbol
    • Purpose: Indicate the closing symbol of the fence. If this property is not set, indicates that no closing symbol was recognized.
    • Content: A string.
    • Example: ), ], }

➤ Matrix math block

Math nodes of type matrix have the following specific properties:

  • rows
    • Purpose: Provide the content of the matrix, row per row.
    • Content: An array of cells objects, each representing a row of the matrix.
  • cells
    • Purpose: Provide the content of a row of the matrix.
    • Content: An array of math nodes.

➤ System math block

Math nodes of type system have the following specific properties:

  • expressions
    • Purpose: Provide the array of expressions within the system.
    • Content: An array of math nodes.

Text Block

A block of type Text has the following specific properties:

  • label
    • Purpose: Provide the recognition result associated with this text block.
    • Content: A string.
    • Example: "label": "Hello how are you?"
  • words
    • Purpose: Provide the list of recognized words.
    • Content: An array of word objects.

    • Configuration: Words are only present in then JIIX export when export.jiix.text.words is configured to true.
  • chars
    • Purpose: Provide the list of recognized characters.
    • Content: An array of character objects.

    • Configuration: Characters are only present in then JIIX export when export.jiix.text.chars is configured to true.
  • spans
    • Purpose: Give a list of text spans providing styling information.
    • Content: An array of text span objects.

    • Configuration: Style is only present in then JIIX export when export.jiix.style is configured to true.

Example:

{
 "type": "Text",
 "id": "7666",
 "bounding-box": { ... },
 "label": "hello",
 "words": [ ... ],
 "chars": [ ... ],
 "spans": [ ... ]
}

Raw Content block

A Raw Content block corresponds to the output of raw digital ink analysis. It is meant to express a segmentation between ink corresponding to text vs. ink corresponding to non-text, with optional interpretation as text and shape recognition results expressed as a hierarchy of diagram items.

A block of type Raw Content has the following specific property:

  • elements
    • Purpose: Provide an array of Raw Content items and/or Diagram items, depending on whether raw-content.recognition.text and raw-content.recognition.shape are set to true or false.
    • Content: An array of Raw Content and/or Diagram items.

Example:

{
  "type": "Raw Content",
  "id": "MainBlock",
  "bounding-box": { ... },
  "elements": [ ... ]
}

Raw Content item block

In addition to common block properties, raw content item blocks also have the following specific properties:

  • kind
    • Purpose: Identify the raw content item as representing “text” or “non-text” ink data
    • Content: text or non-text
  • items
    • Purpose: Provide ink composing the block.
    • Content: An array of strokes items.

    • Configuration: Strokes are present in JIIX export when export.jiix.strokes is configured to true.

Example:

{
 "type": "Raw Content",
 "kind": "text",
 "id": 13,
 "bounding-box": { ... },
 "items": [ ... ]
}
Although raw content item blocks have an id property like other blocks, their identifier is a number and not a string.

Styling of a raw content item block is similar to Drawing for text and non-text blocks without the recognition enabled, otherwise it is similar as that of Diagram item blocks.

Math node complete overview

type operands other properties
number 0 label
symbol 0 label
group >=2  
+ >=1  
- >=1  
× (U+00D7: multiplication sign) >=1  
/ >=1  
÷ (U+00F7: division sign) >=1  
fraction 2  
power 1  
! 1  
percentage 2 (reference, percentage) operator:+, - or × (U+00D7: multiplication sign)
= 2  
> 2  
< 2  
(U+2248: almostEqualTo) 2  
(U+2243: asymptoticallyEqualTo) 2  
(U+2260: notEqualTo) 2  
(U+2261: identicalTo) 2  
(U+2262: notIdenticalTo) 2  
(U+2264: lessThanOrEqualTo) 2  
(U+2265: greaterThanOrEqualTo) 2  
(U+226A: muchLessThan) 2  
(U+226B: muchGreaterThan) 2  
(U+21D0: leftwardsDoubleArrow) 2  
(U+21D2: rightwardsDoubleArrow) 2  
(U+21D4: leftRightDoubleArrow) 2  
(U+2225: parallelTo) 2  
square root 1 (U+221A: square root)
system 0 expressions[node]
matrix 0 rows[cells]
rows 0 cells[node]
fence 1 open symbol, close symbol
underscript 2 (script, underscript)  
overscript 2 (script, overscript)  
underoverscript 3 (script, underscript, overscript)  
superscript 2 (script, superscript)  
subscript 2 (script, subscript)  
subsuperscript 3 (script, subscript, superscript)  
presuperscript 2 (script, presuperscript)  
presubscript 2 (script, presubscript)  
presubsuperscript 3 (script, presubscript, presuperscript)  
partialfractionnumerator 1 (numerator)  
partialfractiondenominator 1 (denominator)  
slantedfraction 2 (numerator, denominator)  

We use cookies to ensure that we give you the best experience on our website Read the privacy policy