Skip to main content

Module doc

Module doc 

Source
Expand description

The document value model.

A scientific article is a round-trippable SIM value: a map of a title and an ordered list of semantic blocks. Blocks are tagged with a block key (not kind, which is reserved for scene nodes) so a document is plain data, distinct from the Scene a lens renders from it. Block kinds: section, prose, equation, figure, table, citation, and embed (an embedded runtime value).

Constants§

ARTICLE_CLASS
The article class symbol carried in the document’s class field.
BLOCK_KEY
The key that tags a block with its kind.

Functions§

article
Build an article document from a title and an ordered list of blocks.
block_kind
The kind of a block (the block tag), if present.
blocks
The article’s ordered blocks.
citation
A citation block.
embed_block
An embedded-runtime block: a runtime value rendered by lens inside the article. Cached output (a precomputed Scene) may be attached later.
equation
An equation block carrying its source (for example TeX).
field
Look up a string-keyed field of a map value.
figure
A figure block.
prose
A prose paragraph block.
section
A section heading block.
table
A table block from rows of cell values.
title
The article title.