Figure

laika.ast.Figure
case class Figure(image: Span, caption: Seq[Span], content: Seq[Block], options: Options) extends Block, BlockContainer

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.

Attributes

Graph
Supertypes
trait Container[Seq[Block]]
trait Block
class Element
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

type Self = Figure

Value members

Concrete methods

override def rewriteChildren(rules: RewriteRules): Figure

Rewrites all children of this container based on the specified rules.

Rewrites all children of this container based on the specified rules.

Concrete types are expected to support rewriting at least for all standard block, span and template span elements they contain, plus optionally for any other elements that have custom support for rewriting.

Attributes

Definition Classes
def withContent(newContent: Seq[Block]): Figure

Creates a copy of this instance with the specified new content.

Creates a copy of this instance with the specified new content.

Implementation note: This method exists to deal with the fact that there is no polymorphic copy method and trades a small bit of boilerplate for avoiding the compile time hit of using shapeless for this.

Attributes

def withOptions(options: Options): Figure

Returns a new instance of this element with the specified options replacing the current value.

Returns a new instance of this element with the specified options replacing the current value.

Attributes

Inherited methods

def collect[B](pf: PartialFunction[Element, B]): List[B]

Collects elements by applying the partial function to all elements it is defined for, in depth-first traversal, including this element itself.

Collects elements by applying the partial function to all elements it is defined for, in depth-first traversal, including this element itself.

Attributes

Inherited from:
ElementTraversal
def foreach(f: Element => Unit): Unit

Invokes the specified function for each child of this element container, including children of children, and this element itself, in depth-first traversal.

Invokes the specified function for each child of this element container, including children of children, and this element itself, in depth-first traversal.

Attributes

Inherited from:
ElementTraversal
def hasId: Boolean

Indicates whether this element has an id assigned.

Indicates whether this element has an id assigned.

Attributes

Inherited from:
Element
def hasStyle(name: String): Boolean

Indicates whether this element has the specified style assigned.

Indicates whether this element has the specified style assigned.

Attributes

Inherited from:
Element

Returns a new instance of this element with its options merged with the specified options.

Returns a new instance of this element with its options merged with the specified options.

Attributes

Inherited from:
Element

Returns a new instance of this element with the new options obtained from applying the specified function to the existing value.

Returns a new instance of this element with the new options obtained from applying the specified function to the existing value.

Attributes

Inherited from:
Element
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Rewrites all block children of this container based on the specified rules.

Rewrites all block children of this container based on the specified rules.

Concrete types are expected to support rewriting at least for all standard block, span and template span elements they contain, plus optionally for any other elements that have custom support for rewriting.

Attributes

Inherited from:
BlockContainer

Rewrites all span children of this container based on the specified rules.

Rewrites all span children of this container based on the specified rules.

Concrete types are expected to support rewriting at least for all standard block, span and template span elements they contain, plus optionally for any other elements that have custom support for rewriting.

Attributes

Inherited from:
RewritableContainer
def select(p: Element => Boolean): List[Element]

Selects all elements satisfying the specified predicate, collecting in depth-first traversal, including this element itself.

Selects all elements satisfying the specified predicate, collecting in depth-first traversal, including this element itself.

Attributes

Inherited from:
ElementTraversal
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Inherited from:
ElementContainer
def withId(id: String): Self

Returns a new instance of this element with its id set to the specified value, overriding any existing value.

Returns a new instance of this element with its id set to the specified value, overriding any existing value.

Attributes

Inherited from:
Element
def withStyle(name: String): Self

Returns a new instance of this element with the specified style added to its existing styles.

Returns a new instance of this element with the specified style added to its existing styles.

Attributes

Inherited from:
Element
def withStyles(styles: Iterable[String]): Self

Returns a new instance of this element with the specified styles added to its existing styles.

Returns a new instance of this element with the specified styles added to its existing styles.

Attributes

Inherited from:
Element
def withStyles(style: String, styles: String*): Self

Returns a new instance of this element with the specified styles added to its existing styles.

Returns a new instance of this element with the specified styles added to its existing styles.

Attributes

Inherited from:
Element

Returns a new instance of this element without its id.

Returns a new instance of this element without its id.

Attributes

Inherited from:
Element