Packages

p

laika

ast

package ast

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ast
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AbsoluteInternalTarget(path: Path) extends InternalTarget with Product with Serializable

    Represents a target defined by an absolute path.

  2. case class AutonumberLabel(label: String) extends FootnoteLabel with Product with Serializable

    Label using automatic numbering and explicit label names together.

  3. trait Block extends Element

    The base type for all block level elements.

  4. trait BlockContainer extends Element with ElementContainer[Block] with RewritableContainer

    A container of other Block elements.

    A container of other Block elements. Such a container is usually also a Block itself.

  5. trait BlockContainerCompanion extends SpanContainerCompanion

    Common methods for simple block containers (without additional parameters).

  6. trait BlockResolver extends Element with Block with Unresolved

    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.

  7. case class BlockSequence(content: Seq[Block], options: Options = NoOpt) extends Element with Block with BlockContainer with Product with Serializable

    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.

  8. trait BulletFormat extends AnyRef

    The format of a bullet list item.

  9. case class BulletList(content: Seq[BulletListItem], format: BulletFormat, options: Options = NoOpt) extends Element with Block with ListContainer with RewritableContainer with Product with Serializable

    A bullet list that may contain nested lists.

  10. trait BulletListCompanion extends BlockContainerCompanion

    Base trait for companions that create BulletList instances.

  11. case class BulletListItem(content: Seq[Block], format: BulletFormat, options: Options = NoOpt) extends Element with ListItem with BlockContainer with Product with Serializable

    A single bullet list item consisting of one or more block elements.

  12. case class Caption(content: Seq[Span] = Nil, options: Options = NoOpt) extends Element with TableElement with SpanContainer with Product with Serializable

    The table caption.

  13. sealed trait CategorizedCode extends Element with Span

    A single span inside a code block that has been categorized by a syntax highlighter.

  14. case class Cell(cellType: CellType, content: Seq[Block], colspan: Int = 1, rowspan: Int = 1, options: Options = NoOpt) extends Element with TableElement with BlockContainer with Product with Serializable

    A single cell, potentially spanning multiple rows or columns, containing one or more block elements.

  15. sealed abstract class CellType extends AnyRef

    The cell type specifies which part of the table the cell belongs to.

  16. case class Choice(name: String, label: String, content: Seq[Block], options: Options = NoOpt) extends Element with BlockContainer with Product with Serializable

    Represents a single choice in a ChoiceGroup.

  17. case class Citation(label: String, content: Seq[Block], options: Options = NoOpt) extends Element with Block with LinkTarget with BlockContainer with Product with Serializable

    A citation that can be referred to by a CitationLink by id.

  18. case class CitationLink(refId: String, label: String, options: Options = NoOpt) extends Element with LocalLink with Product with Serializable

    A resolved link to a citation.

  19. case class CitationReference(label: String, source: SourceFragment, options: Options = NoOpt) extends Element with Reference with Product with Serializable

    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.

  20. case class CodeBlock(language: String, content: Seq[Span], codeOptions: Seq[String] = Nil, options: Options = NoOpt) extends Element with Block with SpanContainer with Product with Serializable

    A block of program code.

    A block of program code. The content is a sequence of spans to support the integration of syntax highlighting systems. For unsupported languages the sequence will only consist of a single Text element.

  21. case class CodeSpan(content: String, categories: Set[CodeCategory], options: Options = NoOpt) extends Element with CategorizedCode with TextContainer with Product with Serializable

    A span of code associated with zero or more code categories.

  22. case class CodeSpanSequence(content: Seq[Span], options: Options = NoOpt) extends Element with CategorizedCode with SpanContainer with Product with Serializable

    A sequence of code spans where most of them are usually associated with zero or more code categories.

  23. case class Column(options: Options = NoOpt) extends Element with TableElement with Product with Serializable

    The options (like styles) for a column table.

  24. case class Columns(content: Seq[Column], options: Options = NoOpt) extends Element with TableElement with TableContainer with Product with Serializable

    Contains the (optional) column specification of a table.

  25. case class Comment(content: String, options: Options = NoOpt) extends Element with Block with TextContainer with Product with Serializable

    A comment that may be omitted by renderers.

  26. trait Container[+T] extends Element

    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.

  27. abstract class ContextReference[T <: Span] extends Element with SpanResolver

    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 properties
    • parent: the parent tree of the current document
    • root: the root tree
    • config: all configuration values for the current document, including those inherited from parent trees
  28. sealed trait Cursor extends AnyRef

    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.

  29. case class DecoratedHeader(decoration: HeaderDecoration, content: Seq[Span], source: SourceFragment, options: Options = NoOpt) extends Element with Block with SpanContainer with Unresolved with Product with Serializable

    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.

  30. trait Definition extends Element with Block

    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.

  31. case class DefinitionList(content: Seq[DefinitionListItem], options: Options = NoOpt) extends Element with Block with ListContainer with RewritableContainer with Product with Serializable

    A list of terms and their definitions.

    A list of terms and their definitions. Not related to the Definition base trait.

  32. case class DefinitionListItem(term: Seq[Span], content: Seq[Block], options: Options = NoOpt) extends Element with ListItem with BlockContainer with Product with Serializable

    A single definition item, containing the term and definition (as the content property).

  33. case class Deleted(content: Seq[Span], options: Options = NoOpt) extends Element with Span with SpanContainer with Product with Serializable

    A span representing deleted inline elements that may contain nested spans.

  34. case class Document(path: Path, content: RootElement, fragments: Map[String, Element] = Map.empty, config: Config = Config.empty, position: TreePosition = TreePosition.orphan) extends DocumentStructure with TreeContent with Product with Serializable

    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.

    path

    the full, absolute path of this document in the (virtual) document tree

    content

    the tree model obtained from parsing the markup document

    fragments

    separate named fragments that had been extracted from the content

    config

    the configuration for this document

    position

    the position of this document inside a document tree hierarchy, expressed as a list of Ints

  35. case class DocumentCursor(target: Document, parent: TreeCursor, resolver: ReferenceResolver, config: Config, templatePath: Option[Path], position: TreePosition) extends Cursor with Product with Serializable

    Cursor for a single document, its parent, siblings and root directories, its associated template and other context information that is required during a rewrite operation.

    Cursor for a single document, its parent, siblings and root directories, its associated template and other context information that is required during a rewrite operation.

    target

    the document this cursor points to

    parent

    the parent document tree of the referred document

    resolver

    the resolver for references in templates

    config

    the configuration associated with the target document

    templatePath

    the path of the template that has been applied to this document

    position

    the position of the target document inside a tree hierarchy

  36. case class DocumentFragment(name: String, root: Element, options: Options = NoOpt) extends Element with Block with Hidden with Product with Serializable

    A named document fragment that usually gets rendered separately from the main root element

  37. case class DocumentMetadata(title: Option[String] = None, description: Option[String] = None, identifier: Option[String] = None, authors: Seq[String] = Nil, language: Option[String] = None, date: Option[Date] = None, version: Option[String] = None) extends Product with Serializable

    Metadata associated with a document.

  38. trait DocumentNavigation extends Navigatable

    Represents a document structure with sections that can be turned into a navigation structure.

  39. trait DocumentStructure extends DocumentNavigation

    The structure of a markup document.

  40. case class DocumentTree(path: Path, content: Seq[TreeContent], titleDocument: Option[Document] = None, templates: Seq[TemplateDocument] = Nil, config: Config = Config.empty, position: TreePosition = TreePosition.root) extends TreeStructure with TreeContent with Product with Serializable

    Represents a tree with all its documents, templates, configurations and subtrees.

    Represents a tree with all its documents, templates, configurations and subtrees.

    path

    the full, absolute path of this (virtual) document tree

    content

    the markup documents and subtrees

    titleDocument

    the optional title document of this tree

    templates

    all templates on this level of the tree hierarchy that might get applied to a document when it gets rendered

    config

    the configuration associated with this tree

    position

    the position of this tree inside a document ast hierarchy, expressed as a list of Ints

  41. case class DocumentTreeRoot(tree: DocumentTree, coverDocument: Option[Document] = None, styles: Map[String, StyleDeclarationSet] = ..., staticDocuments: Seq[StaticDocument] = Nil, includes: IncludeMap = Map.empty) extends Product with Serializable

    Represents the root of a tree of documents.

    Represents the root of a tree of documents. In addition to the recursive structure of documents, usually obtained by parsing text markup, it holds additional items like styles and static documents, which may contribute to the rendering of a site or an e-book.

    The styles property of this type is currently only populated and processed when rendering PDF or XSL-FO. Styles for HTML or EPUB documents are part of the staticDocuments property instead and will be integrated into the final output, but not interpreted.

    tree

    the recursive structure of documents, usually obtained from parsing text markup

    coverDocument

    the cover document (usually used with e-book formats like EPUB and PDF)

    styles

    the styles to apply when rendering this tree, only populated for PDF or XSL-FO output

    staticDocuments

    the descriptors for documents that were neither identified as text markup, config or templates, and will be copied as is to the final output

    includes

    the map of configuration includes that may be needed when resolving template configuration

  42. sealed abstract class DocumentType extends Product

    Base type for all document type descriptors.

  43. abstract class Element extends Product with Serializable

    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.

    All node types have an optional id and zero or more associated styles serving as render hints.

  44. trait ElementContainer[+E <: Element] extends Element with Container[Seq[E]] with ElementTraversal

    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.

  45. trait ElementTraversal extends AnyRef

    Provides means to traverse and select elements of a document tree.

    Provides means to traverse and select 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.

  46. case class EmbeddedConfigValue(key: String, value: ConfigValue, options: Options = NoOpt) extends Element with Block with Span with Hidden with Product with Serializable

    A single configuration value to be merged with the top document config.

    A single configuration value to be merged with the top document config. This is particularly useful for directive implementations that need to contribute to the configuration of the document. During rendering these embedded configuration values will be discarded.

  47. case class EmbeddedRoot(content: Seq[Block], indent: Int = 0, options: Options = NoOpt) extends Element with TemplateSpan with BlockContainer with Product with Serializable

    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 ${cursor.currentDocument.content}.

  48. case class Emphasized(content: Seq[Span], options: Options = NoOpt) extends Element with Span with SpanContainer with Product with Serializable

    A span of emphasized inline elements that may contain nested spans.

  49. case class EnumFormat(enumType: EnumType = EnumType.Arabic, prefix: String = "", suffix: String = ".") extends Product with Serializable

    The format of enumerated list items.

  50. case class EnumList(content: Seq[EnumListItem], format: EnumFormat, start: Int = 1, options: Options = NoOpt) extends Element with Block with ListContainer with RewritableContainer with Product with Serializable

    An enumerated list that may contain nested lists.

  51. trait EnumListCompanion extends BlockContainerCompanion

    Base trait for companions that create EnumList instances.

  52. case class EnumListItem(content: Seq[Block], format: EnumFormat, position: Int, options: Options = NoOpt) extends Element with ListItem with BlockContainer with Product with Serializable

    A single enum list item consisting of one or more block elements.

  53. sealed abstract class EnumType extends AnyRef

    Represents the type of an ordered list.

  54. case class ExternalTarget(url: String) extends Target with Product with Serializable

    An external link, outside of the virtual tree of the current transformation.

  55. trait Fallback extends AnyRef

    Provides a fallback for elements the renderer does not know how to deal with.

  56. case class Figure(image: Span, caption: Seq[Span], content: Seq[Block], options: Options = NoOpt) extends Element with Block with BlockContainer with Product with Serializable

    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.

  57. case class Footnote(label: String, content: Seq[Block], options: Options = NoOpt) extends Element with Block with LinkTarget with BlockContainer with Product with Serializable

    A footnote with resolved id and label that can be referred to by a FootnoteLink by id.

  58. case class FootnoteDefinition(label: FootnoteLabel, content: Seq[Block], source: SourceFragment, options: Options = NoOpt) extends Element with Definition with BlockContainer with Unresolved with Product with Serializable

    A footnote definition that needs to be resolved to a final footnote by a rewrite rule based on the label type.

  59. abstract class FootnoteLabel extends AnyRef

    Base type for all types of footnote labels.

  60. case class FootnoteLink(refId: String, label: String, options: Options = NoOpt) extends Element with LocalLink with Product with Serializable

    A resolved link to a footnote.

  61. case class FootnoteReference(label: FootnoteLabel, source: SourceFragment, options: Options = NoOpt) extends Element with Reference with Product with Serializable

    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.

  62. case class ForcedParagraph(content: Seq[Span], options: Options = NoOpt) extends Element with Block with SpanContainer with Fallback with Product with Serializable

    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.

  63. trait GlobalLink extends Element with Link

    A global link that can point to any document within the input tree or to an external target.

  64. case class Header(level: Int, content: Seq[Span], options: Options = NoOpt) extends Element with Block with SpanContainer with Product with Serializable

    A header element with a level, with 1 being the top level of the document.

  65. trait HeaderDecoration extends AnyRef

    Represents the decoration of a header.

    Represents the decoration of a header. Concrete implementations need to be provided by the parser.

  66. trait Hidden extends Element

    Represents a hidden element that will be ignored by renderers.

    Represents a hidden element that will be ignored by renderers.

    These kind of nodes usually provide information that will be extracted from the tree before AST transformations and renderers get applied.

  67. sealed trait Icon extends Element with Span

    Base trait for all supported icon types.

  68. case class IconGlyph(codePoint: Char, title: Option[String] = None, options: Options = NoOpt) extends Element with Icon with Product with Serializable

    Represents a font-based icon, identified by its code point.

    Represents a font-based icon, identified by its code point. Ideally theme authors provide constants for icons provided out of the box, so that the user does not have to look up or memorize the hex code point.

    This avoids the indirection of common approaches where the rendered HTML contains an empty tag with a class which specifies the code point with a :before pseudo-class. This approach would currently not work well with Laika's PDF support which is not based on an interim HTML renderer.

  69. case class IconReference(key: String, source: SourceFragment, options: Options = NoOpt) extends Element with SpanResolver with Reference with Product with Serializable

    A reference to an icon by key.

    A reference to an icon by key.

    The icon must have been registered with the global configuration to be accessible by this node type. The indirection provided by this key allows to more easily swap entire icon sets without touching any code.

  70. case class IconStyle(styleName: String, title: Option[String] = None, options: Options = NoOpt) extends Element with Icon with Product with Serializable

    An icon defined in a style sheet, usually defining a glyph from an icon font.

    An icon defined in a style sheet, usually defining a glyph from an icon font. This icon type is not supported for PDF output, when using font icons with PDF use IconGlyph instead.

  71. case class Image(target: Target, width: Option[Length] = None, height: Option[Length] = None, alt: Option[String] = None, title: Option[String] = None, options: Options = NoOpt) extends Element with GlobalLink with Product with Serializable

    An inline image optional title, alt and size properties.

  72. case class ImageIdReference(text: String, id: String, source: SourceFragment, options: Options = NoOpt) extends Element with Reference with Product with Serializable

    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.

  73. case class ImagePathReference(path: RelativePath, source: SourceFragment, width: Option[Length] = None, height: Option[Length] = None, alt: Option[String] = None, title: Option[String] = None, options: Options = NoOpt) extends Element with PathReference with Product with Serializable

    An image reference to content within the virtual input tree, the path pointing to the source path.

    An image reference to content within the virtual input tree, the path pointing to the source path. Only part of the unresolved document tree and then removed by the rewrite rule that replace the source path with the final target path of the output document, resolving any relative path references in the process.

  74. case class InlineCode(language: String, content: Seq[Span], options: Options = NoOpt) extends Element with Span with SpanContainer with Product with Serializable

    A span of program code.

    A span of program code. The content is a sequence of spans to support the integration of syntax highlighting systems. Without this support the sequence will only consist of a single Text element.

  75. case class InlineSVGIcon(content: String, title: Option[String] = None, options: Options = NoOpt) extends Element with Icon with Product with Serializable

    An SVG icon that will render inline, supported for all output formats.

  76. case class Inserted(content: Seq[Span], options: Options = NoOpt) extends Element with Span with SpanContainer with Product with Serializable

    A span representing inserted inline elements that may contain nested spans.

  77. case class InternalLinkTarget(options: Options = NoOpt) extends Element with Block with Span with LinkTarget with Product with Serializable

    Points to the following block or span element, making it a target for links.

  78. trait InternalTarget extends Target

    Represents a target within the virtual tree that can be referred to by links.

  79. trait Invalid extends Element with Fallback

    Represents an invalid element.

    Represents an invalid element. Renderers can choose to either render the fallback or the runtime message or both, depending on the configuration of the transformer or renderer.

  80. case class InvalidBlock(message: RuntimeMessage, source: SourceFragment, fallback: Block, options: Options = NoOpt) extends Element with Block with Invalid with Product with Serializable

    Groups a block that could not be successfully parsed with a runtime message.

    Groups a block that could not be successfully parsed with a runtime message. Renderers may then choose to just render the fallback, the message or both.

  81. case class InvalidSpan(message: RuntimeMessage, source: SourceFragment, fallback: Span, options: Options = NoOpt) extends Element with Span with Invalid with Product with Serializable

    Groups a span that could not be successfully parsed with a runtime message.

    Groups a span that could not be successfully parsed with a runtime message. Renderers may then choose to just render the fallback, the message or both.

  82. case class Length(amount: Double, unit: LengthUnit) extends Product with Serializable

    Encapsulates size information with a CSS-compatible length unit.

  83. sealed abstract class LengthUnit extends (Double) ⇒ Length

    A base for builder of CSS-compatible length units.

  84. case class LineBreak(options: Options = NoOpt) extends Element with Span with Product with Serializable

    An explicit hard line break.

  85. trait Link extends Element with Span

    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.

  86. case class LinkAlias(id: String, target: String, options: Options = NoOpt) extends Element with Definition with Span with Hidden with Product with Serializable

    A link target pointing to another link target, acting like an alias.

  87. case class LinkDefinition(id: String, target: Target, title: Option[String] = None, options: Options = NoOpt) extends Element with Definition with Hidden with Span with Product with Serializable

    An internal or external link target that can be referenced by id, usually only part of the raw document tree and then removed by the rewrite rule that resolves link and image references.

  88. case class LinkIdReference(content: Seq[Span], ref: String, source: SourceFragment, options: Options = NoOpt) extends Element with Reference with SpanContainer with Product with Serializable

    A reference to any kind of referencable object, e.g.

    A reference to any kind of referencable object, e.g. a link definition or an internal target.

    The reference can be local, in the same document, or anywhere else in the input tree, as long as the id is not ambiguous. Search for a matching target happens recursively, from the current document, to the current tree (directory) upwards to the root tree.

  89. case class LinkPathReference(content: Seq[Span], path: RelativePath, source: SourceFragment, title: Option[String] = None, options: Options = NoOpt) extends Element with PathReference with SpanContainer with Product with Serializable

    A reference to content within the virtual input tree, the path pointing to the source path.

    A reference to content within the virtual input tree, the path pointing to the source path. Only part of the unresolved document tree and then removed by the rewrite rule that replace the source path with the final target path of the output document, which might differ in more than just the file suffix, depending on configuration.

  90. trait LinkTarget extends Element with Block

    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.

  91. trait ListContainer extends Element with ElementContainer[ListItem]

    A container of list items.

    A container of list items. Such a container is usually a Block itself.

  92. trait ListItem extends Element

    The base type for all list items.

  93. case class Literal(content: String, options: Options = NoOpt) extends Element with Span with TextContainer with Product with Serializable

    A span containing plain, unparsed text.

  94. case class LiteralBlock(content: String, options: Options = NoOpt) extends Element with Block with TextContainer with Product with Serializable

    A literal block with unparsed text content.

  95. trait LocalLink extends Element with Link

    A local link that always points to a target within the same document.

  96. case class MarkupContextReference(ref: Key, required: Boolean, source: SourceFragment, options: Options = NoOpt) extends ContextReference[Span] with Product with Serializable

    A context reference specifically for use in markup documents.

  97. sealed trait MessageFilter extends AnyRef

    A filter for runtime messages that meet a specified minimum message level.

  98. sealed abstract class MessageLevel extends Ordered[MessageLevel] with Product

    Signals the severity of a runtime message.

  99. trait Navigatable extends AnyRef

    A navigatable object is anything that has an associated path.

  100. case class NavigationBuilderContext(refPath: Path = Root, itemStyles: Set[String] = Set(), maxLevels: Int = Int.MaxValue, currentLevel: Int = 1, excludeSections: Boolean = false, excludeSelf: Boolean = false) extends Product with Serializable

    The context of a navigation builder that can get passed down in recursive calls to the various types that have an asNavigationItem method.

    The context of a navigation builder that can get passed down in recursive calls to the various types that have an asNavigationItem method.

    refPath

    the path of document from which this document will be linked (for creating a corresponding relative path)

    itemStyles

    the styles to assign to each navigation item as a render hint

    maxLevels

    the number of levels of sub-trees, documents or sections to create navigation info for

    currentLevel

    the current level of the navigation tree being built

    excludeSections

    indicates whether the recursion should exclude sections of documents even when maxLevels has not been reached yet

  101. case class NavigationItem(title: SpanSequence, content: Seq[NavigationItem], link: Option[NavigationLink] = None, targetFormats: TargetFormats = TargetFormats.All, options: Options = NoOpt) extends Element with Block with ListItem with ElementContainer[NavigationItem] with RewritableContainer with ListContainer with Product with Serializable

    Represents a navigation entry with an optional target link and optional child items.

    Represents a navigation entry with an optional target link and optional child items. When the target link is not present, this item only serves as a navigation header for its children.

  102. case class NavigationLink(target: Target, selfLink: Boolean = false, targetFormats: TargetFormats = TargetFormats.All) extends Product with Serializable

    Represents a book navigation entry that links to content in the document tree.

  103. case class NavigationList(content: Seq[NavigationItem], options: Options = NoOpt) extends Element with Block with ListContainer with RewritableContainer with Product with Serializable

    The root node of a navigation structure

  104. case class NumericLabel(number: Int) extends FootnoteLabel with Product with Serializable

    Explicit numeric label.

  105. sealed abstract class Options extends AnyRef

    Options for customizable elements.

  106. case class PageBreak(options: Options = NoOpt) extends Element with Block with Product with Serializable

    An explicit hard page break.

  107. case class Paragraph(content: Seq[Span], options: Options = NoOpt) extends Element with Block with SpanContainer with Product with Serializable

    A paragraph consisting of span elements.

  108. case class ParentSelector(selector: StyleSelector, immediate: Boolean) extends Product with Serializable

    Represents a parent selector and indicates whether it is an immediate parent or an ancestor anywhere in the hierarchy.

  109. case class ParsedLiteralBlock(content: Seq[Span], options: Options = NoOpt) extends Element with Block with SpanContainer with Product with Serializable

    A literal block with parsed text content.

  110. sealed trait Path extends PathBase

    Represents a path inside a virtual tree of documents.

  111. sealed trait PathBase extends Product with Serializable

    The abstract base for absolute and relative paths.

    The abstract base for absolute and relative paths.

    A path in Laika is always virtual and not pointing to a path in the file system, even if the data was obtained by scanning a directory. This is because in Laika transformation input can come from different sources, e.g. from two different directories merged into a single virtual tree in memory with some additional documents added programmatically without any file system reference.

  112. trait PathReference extends Element with Reference

    A reference to content within the virtual input tree, the path pointing to the source path.

    A reference to content within the virtual input tree, the path pointing to the source path. Only part of the unresolved document tree and then removed by the rewrite rule that replace the source path with the final target path of the output document, which might differ in more than just the file suffix, depending on configuration.

  113. case class QuotedBlock(content: Seq[Block], attribution: Seq[Span] = Nil, options: Options = NoOpt) extends Element with Block with BlockContainer with Product with Serializable

    A quoted block consisting of a list of blocks that may contain other nested quoted blocks and an attribution which may be empty.

  114. case class RawContent(formats: NonEmptySet[String], content: String, options: Options = NoOpt) extends Element with Block with Span with TextContainer with Product with Serializable

    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.

  115. case class RawLink(target: Target, options: Options = NoOpt) extends Element with GlobalLink with Product with Serializable

    A raw link element without associated content (text or image).

    A raw link element without associated content (text or image).

    One potential use case is to insert AST nodes that are only responsible for rendering a single tag attribute as opposed to rendering the full tag like all other link node types.

    Raw links participate in path translation (e.g. for versioning) like all other link node types.

  116. trait Reference extends Element with Span with Unresolved

    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.

  117. case class RelativeInternalTarget(path: RelativePath) extends InternalTarget with Product with Serializable

    Represents a target defined by a relative path; the absolute path of such a target needs to be resolved later in the context of the containing document and its path.

  118. sealed trait RelativePath extends PathBase
  119. type RenderFunction = PartialFunction[Element, Unit]

    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).

  120. case class Replace[T](newValue: T) extends RewriteAction[T] with Product with Serializable

    Indicates that the element a rewrite rule had been applied to should be replaced with this new value.

  121. case class ResolvedInternalTarget(absolutePath: Path, relativePath: RelativePath, internalFormats: TargetFormats = TargetFormats.All) extends InternalTarget with Product with Serializable

    Represents a resolved internal target where both the absolute and relative path are known, the latter relative to the document that referred to the target.

    Represents a resolved internal target where both the absolute and relative path are known, the latter relative to the document that referred to the target.

    The internalFormats property describes which of the output formats treat this as an internal link. For other formats the link gets translated to an external target based on the siteBaseURL setting. This might be useful for cases where some pages get rendered to a site, but not included in an e-book format like EPUB and PDF.

  122. case class Reverse(length: Int, target: Span, fallback: Span, options: Options = NoOpt) extends Element with Span with Product with Serializable
  123. trait RewritableContainer extends Element

    A generic container of child elements which can have rewrite rules applied to them in recursive tree rewriting.

  124. sealed trait RewriteAction[+T] extends AnyRef

    Describes the action to be performed for a particular node in the document AST.

  125. type RewriteRule[T] = PartialFunction[T, RewriteAction[T]]

    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 or the rule returns a Retain action as a result the old element remains in the tree unchanged.

    If it returns Remove then the node gets removed from the ast, if it returns Replace with a new element it will replace the old one.

  126. case class RewriteRules(spanRules: Seq[RewriteRule[Span]] = Nil, blockRules: Seq[RewriteRule[Block]] = Nil, templateRules: Seq[RewriteRule[TemplateSpan]] = Nil) extends Product with Serializable

    A set of rewrite rules describing a set of modifications to be applied to an AST of a document.

    A set of rewrite rules describing a set of modifications to be applied to an AST of a document.

    For reasons of type-safety the major element type blocks and spans (in markup documents) and template spans (in template documents) have their separate set of rules, as an element in a block position for example can usually only be replaced by another block and not by any other element type.

  127. case class RootCursor extends Product with Serializable

    Cursor for the root node of a document tree, providing access to all child cursors of this tree and allowing to trigger rewrite operations.

  128. case class RootElement(content: Seq[Block], options: Options = NoOpt) extends Element with Block with BlockContainer with Product with Serializable

    The root element of a document tree.

  129. case class Row(content: Seq[Cell], options: Options = NoOpt) extends Element with TableElement with TableContainer with RewritableContainer with Product with Serializable

    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.

  130. case class Rule(options: Options = NoOpt) extends Element with Block with Product with Serializable

    A horizontal rule.

  131. case class RuntimeMessage(level: MessageLevel, content: String, options: Options = NoOpt) extends Element with Span with Block with TextContainer with Product with Serializable

    Message generated by the parser, a directive or a rewrite rule.

    Message generated by the parser, a directive or a rewrite rule.

    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 message of level MessageLevel.Error will cause a transformation to fail, unless the user has configured with the renderErrors method to debug in a visual mode in which case the errors will get rendered in-place in the output.

  132. case class SVGSymbolIcon(target: Target, title: Option[String] = None, options: Options = NoOpt) extends Element with Icon with Product with Serializable

    An icon referencing an SVG shape defined in an external file or embedded SVG element.

    An icon referencing an SVG shape defined in an external file or embedded SVG element. This icon type is not supported for PDF output, when using SVG icons with PDF use InlineSVGIcon instead.

  133. case class Section(header: Header, content: Seq[Block], options: Options = NoOpt) extends Element with Block with BlockContainer with Product with Serializable

    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.

  134. case class SectionInfo(id: String, title: SpanSequence, content: Seq[SectionInfo], options: Options = NoOpt) extends Element with ElementContainer[SectionInfo] with Product with Serializable

    Captures information about a document section, without its content.

  135. case class SectionNumber(position: Seq[Int], options: Options = NoOpt) extends Element with Span with TextContainer with Product with Serializable

    Represents a section number, usually used in header elements when autonumbering is applied.

  136. case class SegmentedPath(segments: NonEmptyChain[String], suffix: Option[String] = None, fragment: Option[String] = None) extends Path with SegmentedPathBase with Product with Serializable
  137. sealed trait SegmentedPathBase extends PathBase

    The common base for absolute and relative paths that contain one or more path segments.

  138. case class SegmentedRelativePath(segments: NonEmptyChain[String], suffix: Option[String] = None, fragment: Option[String] = None, parentLevels: Int = 0) extends RelativePath with SegmentedPathBase with Product with Serializable
  139. case class Selection(name: String, choices: Seq[Choice], options: Options = NoOpt) extends Element with Block with RewritableContainer with Product with Serializable

    Represents a selection of choices (alternatives) that represent the same content in different ways, e.g.

    Represents a selection of choices (alternatives) that represent the same content in different ways, e.g. a code sample in Scala or Java or a build setup in sbt vs. Maven. In the final output these will usually be rendered in a way to allow for a convenient selection.

  140. case class SomeOpt(id: Option[String] = None, styles: Set[String] = Set()) extends Options with Product with Serializable

    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.

  141. trait Span extends Element

    The base type for all inline elements.

  142. trait SpanContainer extends Element with ElementContainer[Span] with RewritableContainer

    A container of other Span elements.

    A container of other Span elements. Such a container may be a Block or a Span itself.

  143. trait SpanContainerCompanion extends AnyRef

    Common methods for simple span containers (without additional parameters).

  144. case class SpanLink(content: Seq[Span], target: Target, title: Option[String] = None, options: Options = NoOpt) extends Element with GlobalLink with SpanContainer with Product with Serializable

    An link element, with the span content representing the text (description) of the link.

  145. trait SpanResolver extends Element with Span with Unresolved

    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.

  146. case class SpanSequence(content: Seq[Span], options: Options = NoOpt) extends Element with Block with Span with SpanContainer with Product with Serializable

    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.

  147. case class Specificity(ids: Int, classes: Int, types: Int, order: Int) extends Ordered[Specificity] with Product with Serializable

    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.

  148. case class StaticDocument(path: Path, formats: TargetFormats = TargetFormats.All) extends Product with Serializable

    A pure descriptor for a static document, without the actual bytes.

    A pure descriptor for a static document, without the actual bytes. Used for evaluating links and other AST transformation phases.

  149. case class StringBullet(bullet: String) extends BulletFormat with Product with Serializable

    Bullet format based on a simple string.

  150. case class Strong(content: Seq[Span], options: Options = NoOpt) extends Element with Span with SpanContainer with Product with Serializable

    A span of strong inline elements that may contain nested spans.

  151. case class StyleDeclaration(selector: StyleSelector, styles: Map[String, String]) extends Product with Serializable

    Represents a single style declaration.

    Represents a single style declaration.

    selector

    the selector to determine which elements this declaration applies to

    styles

    the styles themselves in a map representing the names and values of each style

  152. case class StyleDeclarationSet(paths: Set[Path], styles: Set[StyleDeclaration], precedence: Precedence = Precedence.High) extends Product with Serializable

    Represents a set of one or more style declarations.

    Represents a set of one or more style declarations.

    paths

    the paths the style declarations have been obtained from

    styles

    the style declarations that belong to this set

    precedence

    the precedence of this set compared to other provided sets

  153. sealed trait StylePredicate extends AnyRef

    Represents a single predicate which is part of the selector for a style declaration.

  154. case class StyleSelector(predicates: Set[StylePredicate] = Set(), parent: Option[ParentSelector] = None, order: Int = 0) extends Product with Serializable

    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.

    predicates

    the set of predicates that need to hold for this selector to be applicable to a target element

    parent

    the optional parent selector

    order

    the index of the style declaration this selector belongs to

  155. case class Table(head: TableHead, body: TableBody, caption: Caption = Caption(), columns: Columns = Columns(Nil), options: Options = NoOpt) extends Element with Block with ElementTraversal with RewritableContainer with Product with Serializable

    A table consisting of a head and a body part and optional caption and column specification.

  156. case class TableBody(content: Seq[Row], options: Options = NoOpt) extends Element with TableElement with TableContainer with RewritableContainer with Product with Serializable

    Contains the body rows of a table.

  157. trait TableContainer extends Element with TableElement with ElementContainer[TableElement]

    A container of table elements.

  158. trait TableElement extends Element

    A table element, like a row, cell or column.

  159. case class TableHead(content: Seq[Row], options: Options = NoOpt) extends Element with TableElement with TableContainer with RewritableContainer with Product with Serializable

    Contains the header rows of a table.

  160. sealed trait Target extends AnyRef

    Represents a target that can be referred to by links, either within the virtual tree or external.

  161. case class TargetFormat(formats: NonEmptySet[String], element: Element, options: Options = NoOpt) extends Element with Block with Product with Serializable

    An element that only gets rendered for a specific output format.

  162. case class TemplateContextReference(ref: Key, required: Boolean, source: SourceFragment, options: Options = NoOpt) extends ContextReference[TemplateSpan] with TemplateSpan with Product with Serializable

    A context reference specifically for use in template documents.

  163. case class TemplateDocument(path: Path, content: TemplateRoot, config: ConfigParser = ConfigParser.empty) extends Navigatable with Product with Serializable

    A template document containing the element tree of a parsed template and its extracted configuration section (if present).

  164. case class TemplateElement(element: Element, indent: Int = 0, options: Options = NoOpt) extends Element with TemplateSpan with ElementTraversal with RewritableContainer with Product with Serializable

    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.

  165. case class TemplateRoot(content: Seq[TemplateSpan], options: Options = NoOpt) extends Element with Block with TemplateSpanContainer with Product with Serializable

    The root element of a template document tree.

  166. trait TemplateSpan extends Element with Span

    The base type for all inline elements that can be found in a template.

  167. trait TemplateSpanContainer extends Element with ElementContainer[TemplateSpan] with RewritableContainer

    A container of other TemplateSpan elements.

  168. trait TemplateSpanContainerCompanion extends AnyRef

    Common methods for simple template span containers (without additional parameters).

  169. case class TemplateSpanSequence(content: Seq[TemplateSpan], options: Options = NoOpt) extends Element with TemplateSpan with TemplateSpanContainer with Product with Serializable

    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.

  170. case class TemplateString(content: String, options: Options = NoOpt) extends Element with TemplateSpan with TextContainer with Product with Serializable

    A simple string element, representing the parts of a template that are not detected as special markup constructs and treated as raw text.

  171. case class Text(content: String, options: Options = NoOpt) extends Element with Span with TextContainer with Product with Serializable

    A simple text element.

  172. trait TextContainer extends Element with Container[String]

    A container for plain text.

  173. sealed abstract class TextDocumentType extends DocumentType

    Base type for all document type descriptors for text input.

  174. case class Title(content: Seq[Span], options: Options = NoOpt) extends Element with Block with SpanContainer with Product with Serializable

    The (optional) title of the document.

  175. case class TitledBlock(title: Seq[Span], content: Seq[Block], options: Options = NoOpt) extends Element with Block with BlockContainer with Product with Serializable

    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.

  176. sealed trait TreeContent extends Navigatable

    A titled, positional element in the document tree.

  177. case class TreeCursor(target: DocumentTree, parent: Option[TreeCursor], root: RootCursor, config: Config, position: TreePosition) extends Cursor with Product with Serializable

    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.

    target

    the document tree this cursor points to

    parent

    the immediate parent of this tree or None if this is the root

    root

    the root of this tree

    config

    the configuration associated with this tree

    position

    the position of this tree within the document tree

  178. class TreePosition extends Ordered[TreePosition]

    The position of an element within a document tree.

  179. trait TreeStructure extends AnyRef

    The structure of a document tree.

  180. trait Unresolved extends Element

    Represents an element that needs to be resolved in an AST transformation step.

    Represents an element that needs to be resolved in an AST transformation step.

    Passing documents that still contain elements of this kind to a renderer will usually be treated as errors.

  181. case class UnresolvedDocument(document: Document, config: ConfigParser) extends Product with Serializable

    A temporary structure usually not exposed to user code.

    A temporary structure usually not exposed to user code. It holds a document with an empty Config instance and its actual config (obtained from a header section if present) in unresolved form, as it needs to be resolved based on a fallback configuration later.

  182. case class ~[+A, +B](_1: A, _2: B) extends Product with Serializable

    A wrapper for two result values.

Value Members

  1. object /

    Extractors for pattern matching against absolute and relative paths.

  2. object Autonumber extends FootnoteLabel with Product with Serializable

    Label with automatic numbering.

  3. object Autosymbol extends FootnoteLabel with Product with Serializable

    Label with automatic symbol assignment.

  4. object BlockSequence extends BlockContainerCompanion with Serializable
  5. object BodyCell extends CellType with BlockContainerCompanion with Product with Serializable

    A cell in the body part of the table.

  6. object BulletList extends BulletListCompanion with Serializable

    Companion for creating BulletList instances.

  7. object Caption extends SpanContainerCompanion with Serializable
  8. object CodeSpan extends Serializable
  9. object CodeSpanSequence extends SpanContainerCompanion with Serializable
  10. object CodeSpans
  11. object Columns extends Serializable

    Convenient factory for creating a Columns instance based on the options for the individual columns.

  12. object DecoratedHeader extends Serializable
  13. object DefinitionList extends Serializable
  14. object DefinitionListItem extends Serializable
  15. object Deleted extends SpanContainerCompanion with Serializable
  16. object DocumentCursor extends Serializable
  17. object DocumentMetadata extends Serializable
  18. object DocumentType

    Provides all available DocumentTypes.

  19. object EmbeddedConfigValue extends Serializable
  20. object EmbeddedRoot extends BlockContainerCompanion with Serializable
  21. object Emphasized extends SpanContainerCompanion with Serializable
  22. object EnumList extends EnumListCompanion with Serializable

    Companion for creating BulletList instances.

  23. object EnumType

    Enumeration of supported enum types.

  24. object HeadCell extends CellType with BlockContainerCompanion with Product with Serializable

    A cell in the head part of the table.

  25. object Header extends Serializable
  26. object Id

    Factory and extractor for an Options instance with an id.

  27. object Image extends Serializable
  28. object Inserted extends SpanContainerCompanion with Serializable
  29. object InternalTarget
  30. object InvalidBlock extends Serializable
  31. object InvalidSpan extends Serializable
  32. object LengthUnit
  33. object LinkDefinition extends Serializable
  34. object LinkIdReference extends Serializable

    Companion for creating LinkIdReference instances.

  35. object MessageFilter
  36. object MessageLevel

    Enumeration of available message levels.

    Enumeration of available message levels.

    The library's internal parsers and AST transformation only use the Error level for recoverable issues encountered during transformations. All other levels are available for user code.

  37. object NoOpt extends Options with Product with Serializable

    Empty Options implementation.

  38. object Options

    Companion for the Options trait.

  39. object Paragraph extends SpanContainerCompanion with Serializable
  40. object ParsedLink
  41. object ParsedLiteralBlock extends SpanContainerCompanion with Serializable
  42. object ParsedTarget
  43. object Path extends Serializable

    Factory methods for creating path instances.

  44. object PathBase extends Serializable
  45. object QuotedBlock extends BlockContainerCompanion with Serializable
  46. object RawLink extends Serializable

    Companion for creating RawLink instances.

  47. object RelativePath extends Serializable
  48. object Remove extends RewriteAction[Nothing] with Product with Serializable

    Indicates that the element a rewrite rule had been applied to should be removed from the document AST.

  49. object Retain extends RewriteAction[Nothing] with Product with Serializable

    Indicates that the element a rewrite rule had been applied to should be kept in the document AST unchanged.

  50. object RewriteRules extends Serializable

    Factory methods and utilities for dealing with rewrite rules.

  51. object RomanNumerals

    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.

  52. object RootCursor extends Serializable
  53. object RootElement extends BlockContainerCompanion with Serializable
  54. object Row extends Serializable
  55. object SVGSymbolIcon extends Serializable

    Companion for creating SVGSymbolIcon instances.

  56. object SegmentedPathBase extends Serializable
  57. object SpanLink extends Serializable

    Companion for creating SpanLink instances.

  58. object SpanSequence extends SpanContainerCompanion with Serializable
  59. object StaticDocument extends Serializable
  60. object Strong extends SpanContainerCompanion with Serializable
  61. object Style

    Constants for style names wrapped in Options instances which are commonly used by Laika's core parsers and rewrite rules.

  62. object StyleDeclaration extends (StyleSelector, Map[String, String]) ⇒ StyleDeclaration with Serializable

    Companion providing factory methods for the StyleDeclaration class.

  63. object StyleDeclarationSet extends (Set[Path], Set[StyleDeclaration], Precedence) ⇒ StyleDeclarationSet with Serializable

    Companion providing factory methods for the StyleDeclaration class.

  64. object StylePredicate

    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).

  65. object Styles

    Factory and extractor for an Options instance with style names.

  66. object Table extends Serializable
  67. object Target
  68. object TemplateRoot extends TemplateSpanContainerCompanion with Serializable

    Companion with a fallback instance for setups without a default template

  69. object TemplateSpanSequence extends TemplateSpanContainerCompanion with Serializable
  70. object Title extends SpanContainerCompanion with Serializable
  71. object TreeBuilder

    Generically builds a tree structure out of a flat sequence of elements with a Path property that signifies the position in the tree.

    Generically builds a tree structure out of a flat sequence of elements with a Path property that signifies the position in the tree. Essentially factors recursion out of the tree building process.

  72. object TreeCursor extends Serializable
  73. object TreePosition

Inherited from AnyRef

Inherited from Any

Ungrouped