Nokome Bentley2 min read

Styled Inline

Styled inline content.

This type is marked as unstable and is subject to change.

Properties

The StyledInline type has these properties:

Name Description Type Inherited from JSON-LD @id Aliases
id The identifier for this item. String Entity schema:id -
code The code of the equation in the styleLanguage. Cord Styled stencila:code -
styleLanguage The language used for the style specification e.g. css, tw String Styled stencila:styleLanguage style-language, style_language
authors The authors of the code and content in the styled node. Author* Styled schema:author author
provenance A summary of the provenance of the code and content in the styed node. ProvenanceCount* Styled stencila:provenance -
compilationDigest A digest of the code and styleLanguage. CompilationDigest Styled stencila:compilationDigest compilation-digest, compilation_digest
compilationMessages Messages generated while parsing and transpiling the style. CompilationMessage* Styled stencila:compilationMessages compilation-messages, compilation_messages, compilationMessage, compilation-message, compilation_message
css A Cascading Style Sheet (CSS) transpiled from the code property. String Styled stencila:css -
classList A space separated list of class names associated with the node. String Styled stencila:classList class-list, class_list
content The content within the span. Inline* - stencila:content -

Related

The StyledInline type is related to these types:

Formats

The StyledInline type can be encoded (serialized) to, and/or decoded (deserialized) from, these formats:

Format Encoding Decoding Support Notes
DOM HTML 🟢 No loss
HTML 🔷 Low loss Encoded as <span>
JATS 🟢 No loss 🟢 No loss Encoded as <styled-content>
Markdown ⚠️ High loss Encoded using implemented function
Stencila Markdown ⚠️ High loss
Quarto Markdown ⚠️ High loss
MyST Markdown ⚠️ High loss
LLM Markdown ⚠️ High loss
LaTeX 🔷 Low loss 🔷 Low loss
PDF 🔷 Low loss
Plain text ⚠️ High loss
IPYNB 🔷 Low loss 🔷 Low loss
Microsoft Word DOCX 🔷 Low loss 🔷 Low loss
OpenDocument ODT 🔷 Low loss 🔷 Low loss
TeX 🔷 Low loss 🔷 Low loss
JSON 🟢 No loss 🟢 No loss
JSON+Zip 🟢 No loss 🟢 No loss
JSON5 🟢 No loss 🟢 No loss
JSON-LD 🟢 No loss 🟢 No loss
CBOR 🟢 No loss 🟢 No loss
CBOR+Zstandard 🟢 No loss 🟢 No loss
YAML 🟢 No loss 🟢 No loss
Lexical JSON 🔷 Low loss 🔷 Low loss
Koenig JSON 🔷 Low loss 🔷 Low loss
Pandoc AST 🔷 Low loss 🔷 Low loss
Directory
Stencila Web Bundle
Debug 🔷 Low loss

Bindings

The StyledInline type is represented in:

Testing

During property-based (a.k.a generative) testing, the properties of the StyledInline type are generated using the following strategies for each complexity level. Any optional properties that are not in this table are set to None.

Property Complexity Description Strategy
code Min+ Generate a simple fixed string of code. Cord::from("code")
Low+ Generate a random string of up to 10 alphanumeric & space characters (trimmed). Avoid keywords used to identify other node types. r"[a-zA-Z0-9 ]{1,10}".prop_filter("No keywords", |code| !["include", "call", "if", "ifblock", "for"].contains(&code.trim())).prop_map(|code| Cord::from(code.trim()))
High+ Generate a random string of up to 100 characters (excluding control characters). r"[^\p{C}]{1,100}".prop_map(Cord::from)
Max Generate an arbitrary string. String::arbitrary().prop_map(Cord::from)
styleLanguage Min+ Do not generate a style language. None
High+ Generate a random string of up to 10 alphanumeric characters. option::of(r"[a-zA-Z0-9]{1,10}")
Max Generate an arbitrary string. option::of(String::arbitrary())
content Min+ Generate a single fixed text value. vec![t("text")]
High+ Generate up to two arbitrary, non-recursive, inline nodes vec_inlines_non_recursive(2)
Max Generate up to four arbitrary, non-recursive, inline nodes vec_inlines_non_recursive(4)

Source

This documentation was generated from StyledInline.yaml by docs_types.rs.