Content within the document tree that is neither titled nor positional.
Content within the document tree that is neither titled nor positional. These are usually helper documents that do not show up in the main navigation for the document tree.
Label using automatic numbering and explicit label names together.
The base type for all block level elements.
A container of other Block elements.
A container of other Block elements. Such a container is usually also a Block itself.
Represents a placeholder block element that needs to be resolved in a rewrite step.
Represents a placeholder block element that needs to be resolved in a rewrite step. Useful for elements that need access to the document, structure, title or configuration before being fully resolved.
A generic container element containing a list of blocks.
A generic container element containing a list of blocks. Can be used where a sequence of blocks must be inserted in a place where a single element is required by the API. Usually renderers do not treat the container as a special element and render its children as s sub flow of the parent container.
The format of a bullet list item.
A bullet list that may contain nested lists.
A single bullet list item consisting of one or more block elements.
The table caption.
A single cell, potentially spanning multiple rows or columns, containing one or more block elements.
The cell type specifies which part of the table the cell belongs to.
A citation that can be referred to by a CitationLink
by id.
A resolved link to a citation.
A reference to a citation with a matching label.
A reference to a citation with a matching label. Only part of the raw document tree and then removed by the rewrite rule that resolves link and image references.
A span of program code.
A span of program code. The content is a sequence of spans to support
the later integration of syntax highlighting systems. Without this support
the sequence will only consist of a single Text
element.
A block of program code.
A block of program code. The content is a sequence of spans to support
the later integration of syntax highlighting systems. Without this support
the sequence will only consist of a single Text
element.
The options (like styles) for a column table.
Contains the (optional) column specification of a table.
A comment that may be omitted by renderers.
A single configuration value to be merged with the top document config.
A single configuration value to be merged with the top document config. The value can be any type allowed by the Typesafe Config library (i.e. Boolean, Number, String, Map, Iterable).
A generic container.
A generic container.
Usually not mixed in directly, instead one of the sub-traits
TextContainer
, ListContainer
, SpanContainer
or BlockContainer
should be used.
Represents a reference to a value from the context of the current document.
Represents a reference to a value from the context
of the current document. The ref
attribute
is a simple path expression in dot notation
for accessing properties of an object (or keys
of a Map).
The root elements accessible to such a reference are:
document
: the current document with all of its public propertiesparent
: the parent tree of the current documentroot
: the root treeconfig
: all configuration values for the current document,
including those inherited from parent trees
A link element pointing to a location in a different document, with the span content representing the text (description) of the link.
A cursor provides the necessary context during a rewrite operation.
A cursor provides the necessary context during a rewrite operation. The stateless document tree cannot provide access to parent or sibling nodes in the tree, therefore a temporary cursor instance is created during a rewrite operation for this purpose.
An element that can be customized.
An element that can be customized. Represents options that are usually only used on few selected nodes and can control subtle differences often only relevant for renderers.
A decorated header where the level gets determined in the rewrite phase based on the decoration used and the order they appear in the document.
A decorated header where the level gets determined in the rewrite phase based on the decoration used and the order they appear in the document. The first decoration type encountered is used for level 1, the second for level 2, and so on.
Represents a definition that can be used to resolve references.
Represents a definition that can be used to resolve references.
Only part of the raw document tree and then removed or replaced by a rewrite rule before rendering.
A list of terms and their definitions.
A list of terms and their definitions.
Not related to the Definition
base trait.
A single definition item, containing the term and definition (as the content property).
A span representing deleted inline elements that may contain nested spans.
Represents a single document and provides access to the document content and structure as well as hooks for triggering rewrite operations.
Represents a single document and provides access to the document content and structure as well as hooks for triggering rewrite operations.
the full, absolute path of this document in the (virtual) document tree
the tree model obtained from parsing the markup document
separate named fragments that had been extracted from the content
the configuration for this document
the position of this document inside a document tree hierarchy, expressed as a list of Ints
Cursor for a single document, its parent and root directories, its associated template and other context information that is required during a rewrite operation.
Cursor for a single document, its parent and root directories, its associated template and other context information that is required during a rewrite operation.
the document this cursor points to
the parent document tree of the referred document
the resolver for references in templates
the configuration associated with the target document
the position of the target document inside a tree hierarchy
A named document fragment that usually gets rendered separately from the main root element
The structure of a markup document.
Represents a tree with all its documents and subtrees.
Represents a tree with all its documents and subtrees.
the full, absolute path of this (virtual) document tree
the markup documents and subtrees
all templates on this level of the tree hierarchy that might get applied to a document when it gets rendered
the styles to apply when rendering this tree
all dynamic or static documents that are not part of the main navigatable content of the tree
the configuration associated with this tree
the position of this tree inside a document ast hierarchy, expressed as a list of Ints
the paths this document tree has been built from or an empty list if this ast does not originate from the file system
Base type for all document type descriptors.
A dynamic document that has been obtained from a template not associated with any markup document.
The base class for all Elements forming the document tree.
The base class for all Elements forming the document tree.
Usually not extended directly, instead either Span
or
Block
should be picked as the base type for new element
types.
A generic container of other elements.
A generic container of other elements. Provides means to traverse, select and rewrite children of this container.
Usually not mixed in directly, instead one of the sub-traits
ListContainer
, SpanContainer
or BlockContainer
should be used.
Provides means to traverse, select and rewrite elements of a document tree.
Provides means to traverse, select and rewrite elements of a document tree. This trait can get mixed in by any element node, not just the root Document class, therefore providing traversal for any kind of sub-tree, too.
The root element of a document tree (originating from text markup) inside a template.
The root element of a document tree (originating from text markup) inside a template.
Usually created by a template reference like {{document.content}}
.
A span of emphasized inline elements that may contain nested spans.
The format of enumerated list items.
An enumerated list that may contain nested lists.
A single enum list item consisting of one or more block elements.
Represents the type of an ordered list.
An external link element, with the span content representing the text (description) of the link.
An external link target, usually only part of the raw document tree and then removed by the rewrite rule that resolves link and image references.
Provides a fallback for elements the renderer does not know how to deal with.
A figure consists of an image, an optional caption, and an optional legend as the content
property.
A figure consists of an image, an optional caption, and an optional legend as the content
property.
The image
property is of type Span
as the image might be wrapped inside a link reference.
A footnote with resolved id and label that can be referred to by a FootnoteLink
by id.
A footnote definition that needs to be resolved to a final footnote by a rewrite rule based on the label type.
Base type for all types of footnote labels.
A resolved link to a footnote.
A reference to a footnote with a matching label.
A reference to a footnote with a matching label. Only part of the raw document tree and then removed by the rewrite rule that resolves link and image references.
A special type of paragraph that serves as a render hint.
A special type of paragraph that serves as a render hint.
Some renderers simplify the rendering of block elements containing only a single
paragraph and render the span content inline (e.g. a <li>
tag without a nested <p>
tag
for the paragraph).
Using this element as mandated by some edge cases in both the Markdown and reStructuredText
markup definitions prevents this.
A header element with a level, with 1 being the top level of the document.
Represents the decoration of a header.
Represents the decoration of a header. Concrete implementations need to be provided by the parser.
An inline image with a text description and optional title.
An image reference, the id pointing to the id of a LinkTarget
.
An image reference, the id pointing to the id of a LinkTarget
. Only part of the
raw document tree and then removed by the rewrite rule that resolves link and image references.
A span representing inserted inline elements that may contain nested spans.
An internal link element, with the span content representing the text (description) of the link.
Points to the following block or span element, making it a target for links.
Represents an invalid element.
Represents an invalid element. Renderers can choose to either render the fallback or the system message or both.
Groups a block that could not be successfully parsed with a system message.
Groups a block that could not be successfully parsed with a system message. Renderers may then choose to just render the fallback, the message or both.
Represents an invalid element in any position, block, span or template.
Represents an invalid element in any position, block, span or template. Provides convenience converters to produce instances for any of these three positions.
Groups a span that could not be successfully parsed with a system message.
Groups a span that could not be successfully parsed with a system message. Renderers may then choose to just render the fallback, the message or both.
A single line inside a line block.
A block containing lines which preserve line breaks and optionally nested line blocks.
A single item inside a line block.
An explicit hard line break.
The base type for all link elements.
The base type for all link elements.
In contrast to the reference type, it is only mixed in by elements representing resolved links that can be dealt with by renderers.
A link target pointing to another link target, acting like an alias.
A link reference, the id pointing to the id of a LinkTarget
.
A link reference, the id pointing to the id of a LinkTarget
. Only part of the
raw document tree and then removed by the rewrite rule that resolves link and image references.
The base type for all link targets.
The base type for all link targets. The id has to be
unique for the whole document across all types
of LinkTarget
implementations.
A container of list items.
A container of list items. Such a container is usually a Block itself.
The base type for all list items.
A span containing plain, unparsed text.
A literal block with unparsed text content.
A context reference specifically for use in markup documents.
Signals the severity of a system message.
A navigatable object is anything that has an associated path.
Explicit numeric label.
Options for customizable elements.
An explicit hard page break.
A paragraph consisting of span elements.
Represents a parent selector and indicates whether it is an immediate parent or an ancestor anywhere in the hierarchy.
A literal block with parsed text content.
Represents a path inside a virtual tree of documents.
Represents a single path in absolute and relative form.
A quoted block consisting of a list of blocks that may contain other nested quoted blocks and an attribution which may be empty.
Raw content that is usually specific to the specified output formats.
Raw content that is usually specific to the specified output formats. Can be used as both block and inline element. If supported by a parser it usually has to be explicitly enabled due to security concerns.
The base type for all reference elements.
The base type for all reference elements.
A reference points to some other node in the document tree and needs to be resolved and replaced by a rewrite rule before rendering. Therefore none of the available renderers include logic for dealing with references.
Specifies a custom render function that may override the rendered output for one or more node types.
Specifies a custom render function that may override the rendered output for one or more node types. For elements this function is not defined the renderer will fall back to the default renderer (or the next custom renderer, in case there are multiple).
Specifies how a particular element, document or document tree should be rewritten.
Specifies how a particular element, document or document tree should be rewritten.
If the rule is not defined for a specific element the old element remains
in the tree unchanged. If it returns None
then the node gets removed from the ast,
if it returns an element it will replace the old one. Of course the function may
also return the old element.
The root element of a document tree.
A single table row.
A single table row. In case some of the previous rows contain cells with a colspan greater than 1, this row may contain fewer cells than the number of columns in the table.
A horizontal rule.
A section of the document, consisting of a header and content in the form of a list of Block elements.
A section of the document, consisting of a header and content in the form of a list of Block elements. Sections may be nested inside other sections, they are arranged in a hierarchy based on the level of their header element.
Captures information about a document section, without its content.
Represents a section number, usually used in header elements when autonumbering is applied.
Encapsulates size information with a unit.
Options
implementation for non-empty instances.
Options
implementation for non-empty instances.
For creating new instances it is usually more convenient to use the various factory objects. Example for creating an instance with an id and two styles applied:
val options = Id("myId") + Styles("style1","style2")
Likewise it is also often more convenient to use the corresponding extractors for pattern matching.
The base type for all inline elements.
A container of other Span elements.
A container of other Span elements. Such a container may be a Block or a Span itself.
Represents a placeholder inline element that needs to be resolved in a rewrite step.
Represents a placeholder inline element that needs to be resolved in a rewrite step. Useful for elements that need access to the document, structure, title or configuration before being fully resolved.
A generic container element containing a list of spans.
A generic container element containing a list of spans. Can be used where a sequence of spans must be inserted in a place where a single element is required by the API. Usually renderers do not treat the container as a special element and render its children as s sub flow of the parent container. A span sequence is special in that in can be used as both a span and a block.
Represents the specificity of a style selector or predicate.
Represents the specificity of a style selector or predicate. This is modeled after the precedence rules of the CSS standard.
A static document that might get copied to the target document tree as is.
Bullet format based on a simple string.
A span of strong inline elements that may contain nested spans.
Represents a single style declaration.
Represents a single style declaration.
the selector to determine which elements this declaration applies to
the styles themselves in a map representing the names and values of each style
Represents a set of one or more style declarations.
Represents a set of one or more style declarations.
the paths the style declarations have been obtained from
the style declarations that belong to this set
Represents a single predicate which is part of the selector for a style declaration.
Responsible for determining whether a style declaration should be applied to a target element, basing its decision on a set of predicates.
Responsible for determining whether a style declaration should be applied to a target element, basing its decision on a set of predicates.
the set of predicates that need to hold for this selector to be applicable to a target element
the optional parent selector
the index of the style declaration this selector belongs to
Message generated by the parser, usually to signal potential parsing problems.
Message generated by the parser, usually to signal potential parsing problems. They usually get inserted immediately after the block or span that caused the problem. It mixes in both the Span and Block trait so that it can appear in sequences of both types. By default messages are ignored by most renderers (apart from AST), but they can be explicitly activated for a particular level.
A table consisting of a head and a body part and optional caption and column specification.
Contains the body rows of a table.
A container of table elements.
A table element, like a row, cell or column.
Contains the header rows of a table.
An element that only gets rendered for a specific output format.
A context reference specifically for use in template documents.
A template document containing the element tree of a parsed template and its extracted configuration section (if present).
Wraps a generic element that otherwise could not be placed directly into a template document tree.
Wraps a generic element that otherwise could not be placed directly into a template document tree. Useful when custom tags which are placed inside a template produce non-template tree elements.
The root element of a template document tree.
The base type for all inline elements that can be found in a template.
A generic container element containing a list of template spans.
A generic container element containing a list of template spans. Can be used where a sequence of spans must be inserted in a place where a single element is required by the API. Usually renderers do not treat the container as a special element and render its children as s sub flow of the parent container.
A simple string element, representing the parts of a template that are not detected as special markup constructs and treated as raw text.
Represents a temporary element only present in the raw document tree and then removed or replaced by a rewrite rule before rendering.
A simple text element.
A container for plain text.
The (optional) title of the document.
Represents a section title.
Generic block element with a title.
Generic block element with a title.
Often combined with the the styles
attribute of the options
parameter to provide
additional render hints.
A titled, positional element in the document tree.
Cursor for an entire document tree, providing access to all child cursors of this tree and allowing to trigger rewrite operations.
Cursor for an entire document tree, providing access to all child cursors of this tree and allowing to trigger rewrite operations.
the document tree this cursor points to
the parent of this tree or None
if this is the root
the configuration associated with this tree
the position of this tree within the document tree
The position of an element within a document tree.
The position of an element within a document tree.
the positions (one-based) of each nesting level of this position (an empty sequence for the root position)
The structure of a document tree.
Represents a URI which might also optionally be expressed as a local reference within the processed tree.
A wrapper for two result values.
Label with automatic numbering.
Label with automatic symbol assignment.
A cell in the body part of the table.
Convenient factory for creating a Columns
instance based on the options
for the individual columns.
Provides all available DocumentTypes.
Enumeration of supported enum types.
A cell in the head part of the table.
Factory and extractor for an Options
instance
with an id.
Companion for InvalidElement.
Enumeration of available message levels.
Empty Options
implementation.
Companion for the Options trait.
Factory methods for creating path instances.
Converts Roman numerals to integers and vice versa.
Converts Roman numerals to integers and vice versa. Since there never have been universally accepted rules for Roman numerals, the conversion functions do not apply strict error checking, so some unusual or illegal constructs may be supported, too. They do not prevent using the same symbol more than three times in a row for example.
Companion providing factory methods for the StyleDeclaration class.
Companion providing factory methods for the StyleDeclaration class.
Contains the available predicate types.
Contains the available predicate types.
The available selector types represent a subset of the full CSS standard, picking those features which are reasonably suited in the context of the Laika document model. It includes type, class and id selectors, but no attribute selectors as most Laika tree elements primarily contain a sequence of children and not many other properties to match against.
It also supports the CSS syntax to declare selectors for
child elements (e.g. Paragraph .intro
) or immediate
children (e.g. Paragraph > .intro
).
Factory and extractor for an Options
instance
with style names.
Companion with a fallback instance for setups without a default template