Package-level declarations

Types

Link copied to clipboard

Bibliography styles supported by bibliography. See here for examples of each style.

Link copied to clipboard

Exporter of Quarkdown's standard library.

Link copied to clipboard

The sorting order for a table column.

Properties

Link copied to clipboard

Bibliography stdlib module exporter. This module handles bibliographies and citations.

Link copied to clipboard

Collection stdlib module exporter. This module handles iterable collections.

Link copied to clipboard

Data stdlib module exporter. This module handles content fetched from external resources.

Link copied to clipboard

Dictionary stdlib module exporter. This module handles map-like dictionaries.

Link copied to clipboard

Document stdlib module exporter. This module handles document information and details.

Link copied to clipboard

Ecosystem stdlib module exporter. This module handles interaction between Quarkdown sources.

Link copied to clipboard

Flow stdlib module exporter. This module handles the control flow and other statements.

Link copied to clipboard

Injection stdlib module exporter. This module handles code injection of different languages.

Link copied to clipboard

Layout stdlib module exporter. This module handles position and shape of an element.

Link copied to clipboard

Library stdlib module exporter. This module handles loaded libraries and their functions.

Link copied to clipboard

Localization stdlib module exporter. This module handles localization-related features.

Link copied to clipboard

Logger stdlib module exporter. This module contains logging utility.

Link copied to clipboard

Logical stdlib module exporter.

Link copied to clipboard

Math stdlib module exporter.

Link copied to clipboard

Mermaid stdlib module exporter. This module handles generation of Mermaid diagrams.

Link copied to clipboard

Fallback value for non-existent elements in collections, dictionaries, and more.

Link copied to clipboard

Optionality stdlib module exporter. This module handles None values to express optional values.

Link copied to clipboard

Reference stdlib module exporter. This module handles cross-references.

Link copied to clipboard

Slides stdlib module exporter. This module handles slides properties.

Link copied to clipboard

String stdlib module exporter. This module handles string manipulation.

Link copied to clipboard

TableComputation stdlib module exporter. This module provides advanced functionality for tables, enhancing their capabilities beyond basic data representation. It adds dynamic operations like sorting, filtering, calculations.

Link copied to clipboard

Text stdlib module exporter. This module handles text formatting.

Functions

Link copied to clipboard
fun abs(x: Number): <Error class: unknown class>
Link copied to clipboard
fun align(alignment: Container.Alignment, body: MarkdownContent): <Error class: unknown class>

Aligns content and text within its parent.

Link copied to clipboard
fun autopagebreak(maxdepth: Int): Void

Sets a new automatic page break threshold when a heading is found: if a heading's depth value (the amount of leading #s) is equal to or less than maxdepth, a page break is forced before the heading.

Link copied to clipboard
fun average(from: Iterable<Any>): Number
Link copied to clipboard
fun bibliography(path: String, style: BibliographyStyle = BibliographyStyle.PLAIN, title: InlineMarkdownContent? = null, decorativetitle: Boolean = false): Node

Generates a bibliography from a BibTeX file.

Link copied to clipboard
fun box(title: InlineMarkdownContent? = null, type: Box.Type = Box.Type.CALLOUT, padding: Size? = null, background: Color? = null, foreground: Color? = null, body: MarkdownContent): Node

Inserts content in a styled box.

Link copied to clipboard
fun br(): <Error class: unknown class>

Creates a line break. In standard Markdown, this is also achievable with two spaces at the end of a line, but this function provides a more explicit and unambiguous way to insert a line break.

Link copied to clipboard
fun capitalize(string: String): <Error class: unknown class>

Capitalizes the first character of a string.

Link copied to clipboard
fun captionposition(default: CaptionPosition? = null, figures: CaptionPosition? = null, tables: CaptionPosition? = null, code: CaptionPosition? = null): Void

Sets the position of captions, relative to the content they describe.

Link copied to clipboard
fun center(body: MarkdownContent): <Error class: unknown class>

Centers content and text within its parent.

Link copied to clipboard
fun cite(key: String): <Error class: unknown class>

Creates a citation to a bibliography entry.

Link copied to clipboard
fun clip(clip: Clipped.Clip, body: MarkdownContent): <Error class: unknown class>

Applies a clipping path to its content.

Link copied to clipboard
fun code(lang: String? = null, caption: String? = null, linenumbers: Boolean = true, focus: Range? = null, ref: String? = null, code: EvaluableString): Node

Creates a code block. Contrary to its standard Markdown implementation with backtick/tilde fences, this function accepts function calls within its code argument, hence it can be used - for example - in combination with read to load code from file.

Link copied to clipboard
fun collapse(title: InlineMarkdownContent, open: Boolean = false, body: MarkdownContent): <Error class: unknown class>

Inserts content in a collapsible block, whose content can be hidden or shown by interacting with it.

Link copied to clipboard
fun column(alignment: Stacked.MainAxisAlignment = Stacked.MainAxisAlignment.START, cross: Stacked.CrossAxisAlignment = Stacked.CrossAxisAlignment.CENTER, gap: Size? = null, body: MarkdownContent): <Error class: unknown class>

Stacks content vertically.

Link copied to clipboard
fun concatenate(a: String, with: String, if: Boolean = true): String

Concatenates two strings if a condition is met.

Link copied to clipboard
fun container(width: Size? = null, height: Size? = null, fullwidth: Boolean = false, foreground: Color? = null, background: Color? = null, border: Color? = null, borderwidth: Sizes? = null, borderstyle: Container.BorderStyle? = null, margin: Sizes? = null, padding: Sizes? = null, radius: Sizes? = null, alignment: Container.Alignment? = null, textalignment: Container.TextAlignment? = alignment?.let(Container.TextAlignment::fromAlignment), fontsize: TextTransformData.Size? = null, fontweight: TextTransformData.Weight? = null, fontstyle: TextTransformData.Style? = null, fontvariant: TextTransformData.Variant? = null, textdecoration: TextTransformData.Decoration? = null, textcase: TextTransformData.Case? = null, float: Container.FloatAlignment? = null, body: MarkdownContent? = null): <Error class: unknown class>

A general-purpose container that groups content.

Link copied to clipboard
fun cos(x: Number): Number
Link copied to clipboard
fun css(content: String): <Error class: unknown class>

Creates a <style> HTML element with the provided CSS content. The content is wrapped in a <style> tag and rendered as-is, without any additional processing or escaping, as long as the rendering target supports HTML.

Link copied to clipboard
fun cssproperties(properties: Map<String, Any>): <Error class: unknown class>

Overrides the value of Quarkdown CSS properties.

Link copied to clipboard
fun csv(path: String, caption: String? = null): Node

Loads a CSV file and returns its content as a display-ready table.

Link copied to clipboard
fun currentpage(): <Error class: unknown class>

Displays the index (starting from 1) of the page this element lies in.

Link copied to clipboard
fun debug(message: String): <Error class: unknown class>

Logs a message (debug level) to the standard output. Note that -Dloglevel=debug must be enabled to see debug messages.

Link copied to clipboard
fun dictionary(dictionary: Map<String, Any>): Dictionary<*>

Makes the initialization of a dictionary explicit, to avoid ambiguity with collection initialization.

Link copied to clipboard
Link copied to clipboard
fun divide(a: Number, by: Number): Number
Link copied to clipboard
fun docauthor(author: String? = null): Any

If author is specified, sets the document author to that value. This is a shortcut for docauthors when there's only one author without additional information.

Link copied to clipboard
fun docauthors(authors: Map<String, Dictionary<Any>>? = null): Any

If authors is specified, sets the document authors to that value. Compared to docauthor, this function allows for multiple authors and additional information.

Link copied to clipboard
fun doclang(locale: String? = null): Any

If locale is specified, sets the document language to that value. The document language affects localization (localization, localize), hyphenation and other locale-specific properties.

Link copied to clipboard
fun docname(name: String? = null): Any

If name is specified, sets the document name to that value. The document name affects the name of the output file.

Link copied to clipboard
fun doctype(type: DocumentType? = null): Any

If type is specified, sets the document type to that value. The document type affects its final output style, numbering format and several other properties.

Link copied to clipboard

Compares two values for equality.

Link copied to clipboard
fun error(message: String): <Error class: unknown class>

Throws an Exception with the given message. The result depends on the pipeline's error handler. By default, the message is logged (error level) to the standard output and an error box is rendered on the document. If the program is run on strict mode, the stack trace is printed and the process will be stopped.

Link copied to clipboard
fun figure(caption: String? = null, body: MarkdownContent): Node

Inserts content in a figure block, which features an optional caption and can be numbered according to the figures numbering rules.

Link copied to clipboard
fun first(from: Iterable<Any>): Any
Link copied to clipboard
fun float(alignment: Container.FloatAlignment, body: MarkdownContent): <Error class: unknown class>

Turns content into a floating element, allowing subsequent content to wrap around it.

Link copied to clipboard
fun font(main: String? = null, heading: String? = null, code: String? = null, size: Size? = null): Void

Updates the global font configuration of the document.

Link copied to clipboard
fun footer(content: MarkdownContent): Node

Displays content on the bottom center of each page of a document.

Link copied to clipboard
fun foreach(iterable: Iterable<Any>, body: Lambda): Iterable<Any>

Repeats content for each element of an iterable collection. The current element can be accessed via the lambda argument, which may be either explicit or implicit.

Link copied to clipboard
fun fragment(behavior: SlidesFragment.Behavior = SlidesFragment.Behavior.SHOW, content: MarkdownContent): <Error class: unknown class>

Creates an element that, when used in a slides document, shows its content when the user attempts to go to the next slide.

Link copied to clipboard
fun fullspan(body: MarkdownContent): <Error class: unknown class>

If the document has a multi-column layout (set via pageformat), makes content span across all columns in a multi-column layout.

Link copied to clipboard
fun function(name: String, body: Lambda): Void

Defines a custom function that can be called later in the document.

Link copied to clipboard

Checks whether a function with the given name is registered in context.

Link copied to clipboard
fun get(key: String, from: Map<String, Any>, orelse: Dynamic = DynamicValue(NOT_FOUND)): Any

Gets a value from a dictionary by its key.

Link copied to clipboard
fun getat(from: Iterable<Any>, index: Int, orelse: Dynamic = DynamicValue(NOT_FOUND)): Any
Link copied to clipboard
fun grid(columns: Int, alignment: Stacked.MainAxisAlignment = Stacked.MainAxisAlignment.CENTER, cross: Stacked.CrossAxisAlignment = Stacked.CrossAxisAlignment.CENTER, gap: Size? = null, body: MarkdownContent): Nothing

Stacks content in a grid layout.

Link copied to clipboard

Groups a collection by their value.

Link copied to clipboard
fun html(content: String): <Error class: unknown class>

Creates an HTML element, which is rendered as-is without any additional processing or escaping, as long as the rendering target supports HTML.

Link copied to clipboard
fun if(condition: Boolean, body: Lambda): Any

Performs a conditional evaluation of content, including the evaluation of body only if the condition is met. The expression is not evaluated if the condition is false.

Link copied to clipboard
fun ifnot(condition: Boolean, body: Lambda): Any

Shorthand for .if {.condition::not}.

Link copied to clipboard
fun ifpresent(value: Dynamic, mapping: Lambda): Any

Maps value to the result of mapping.

Link copied to clipboard
fun include(path: String): Any

This function has two behaviors:

Link copied to clipboard

Performs a bulk include of the given paths via include.

Link copied to clipboard
fun isempty(string: String): <Error class: unknown class>

Checks if a string is empty.

Link copied to clipboard
Link copied to clipboard
fun isgreater(a: Number, than: Number, orequals: Boolean = false): Boolean
Link copied to clipboard
fun islower(a: Number, than: Number, orequals: Boolean = false): Boolean
Link copied to clipboard
fun isnone(value: Dynamic): Boolean

Checks whether value represents a none value.

Link copied to clipboard
fun isnotempty(string: String): <Error class: unknown class>

Checks if a string is not empty.

Link copied to clipboard
fun landscape(body: MarkdownContent): <Error class: unknown class>

Transposes content to landscape orientation by rotating it 90 degrees counter-clockwise. This is useful for wide content, such as diagrams, that does not fit in the normal page orientation.

Link copied to clipboard
fun last(from: Iterable<Any>): Any
Link copied to clipboard
fun let(value: Dynamic, body: Lambda): Any

Defines a temporary variable that lives only inside the lambda body.

Link copied to clipboard

Checks whether a library with the given name is registered in context.

Link copied to clipboard
fun libfunctions(libraryName: String): <Error class: unknown class>

Lists the names of all functions exposed by the library with the given name.

Link copied to clipboard
fun libraries(): <Error class: unknown class>

Lists the names of all libraries loaded in context.

Link copied to clipboard
fun localization(name: String, merge: Boolean = false, contents: Map<String, Dictionary<Any>>): Void

Defines and registers a new localization table, whose entries are key-value pairs for each locale and defined by a Markdown dictionary.

Link copied to clipboard
fun localize(key: String, separator: String = ":"): String

Localizes a key from a pre-existing localization table (defined via localization).

Link copied to clipboard
fun log(message: String): <Error class: unknown class>

Logs a message (info level) to the standard output.

Link copied to clipboard
fun logn(x: Number): <Error class: unknown class>
Link copied to clipboard
fun loremipsum(): <Error class: unknown class>
Link copied to clipboard
fun lowercase(string: String): <Error class: unknown class>

Converts a string to lowercase.

Link copied to clipboard
fun marker(name: InlineMarkdownContent): <Error class: unknown class>

Creates an invisible marker, that points to a specific location in the document, and can be referenced by other elements as would happen with a regular heading.

Link copied to clipboard
fun mermaid(caption: String? = null, code: EvaluableString): <Error class: unknown class>

Creates a Mermaid diagram.

Link copied to clipboard
Link copied to clipboard
fun negate(x: Number): <Error class: unknown class>
Link copied to clipboard

Disables automatic page breaks when a heading is found.

Link copied to clipboard
fun node(): Node

Creates a null invisible node that forces the expression it lies in to be evaluated as Markdown content.

Link copied to clipboard
fun none(): None
Link copied to clipboard

Disables numbering across the document, in case a default numbering is set by either numbering or the document type default.

Link copied to clipboard
fun not(value: Boolean): Boolean

Negates a boolean value.

Link copied to clipboard
fun numbered(key: String, ref: String? = null, body: Lambda): Node

Node that can be numbered depending on its location in the document and the amount of occurrences according to its key.

Link copied to clipboard
fun numbering(merge: Boolean = true, formats: Map<String, Any>): Void

Sets the global numbering format across the document. Numbering is applied to elements that support it, such as headings and figures.

Link copied to clipboard
fun otherwise(value: Dynamic, fallback: Dynamic): Dynamic

Returns value if it is not none, fallback otherwise.

Link copied to clipboard
fun pageformat(size: PageSizeFormat? = null, orientation: PageOrientation = context.documentInfo.type.preferredOrientation, width: Size? = null, height: Size? = null, margin: Sizes? = null, bordertop: Size? = null, borderright: Size? = null, borderbottom: Size? = null, borderleft: Size? = null, bordercolor: Color? = null, columns: Int? = null, alignment: Container.TextAlignment? = null): Void

Sets the page layout format of the document. If a value is unset, the default value supplied by the underlying renderer is used.

Link copied to clipboard

Displays content on each page of a document.

Link copied to clipboard
fun pair(first: Dynamic, second: Dynamic): Pair<*, *>

Creates a new pair.

Link copied to clipboard
fun paragraphstyle(lineheight: Number? = null, letterspacing: Number? = null, spacing: Number? = null, indent: Number? = null): Void

Sets the global style of paragraphs in the document. If a value is unset, the default value supplied by the underlying renderer is used.

Link copied to clipboard
fun pi(): Number
Link copied to clipboard
fun pow(base: Number, to: Number): Number
Link copied to clipboard
fun range(from: Number? = null, to: Number? = null): Range

Creates a range of numbers, which can also be iterated through.

Link copied to clipboard
fun read(path: String, lines: Range = Range.INFINITE): String
Link copied to clipboard
fun ref(id: String): <Error class: unknown class>

Creates a reference to a target node with a matching ID.

Link copied to clipboard
fun rem(a: Number, b: Number): Number
Link copied to clipboard
fun repeat(times: Int, body: Lambda): Iterable<Any>

Repeats content N times. This is shorthand for .foreach {..N}.

Link copied to clipboard
Link copied to clipboard

Rounds a floating-point number to the nearest integer.

Link copied to clipboard
fun row(alignment: Stacked.MainAxisAlignment = Stacked.MainAxisAlignment.START, cross: Stacked.CrossAxisAlignment = Stacked.CrossAxisAlignment.CENTER, gap: Size? = null, body: MarkdownContent): <Error class: unknown class>

Stacks content horizontally.

Link copied to clipboard
fun second(from: Iterable<Any>): Any
Link copied to clipboard
fun sin(x: Number): Number
Link copied to clipboard
fun size(of: Iterable<Any>): Number
Link copied to clipboard
fun slides(center: Boolean? = null, controls: Boolean? = null, speakernotes: Boolean? = null, transition: Transition.Style? = null, speed: Transition.Speed = Transition.Speed.DEFAULT): Node

Sets global properties that affect the behavior of a 'slides' document.

Link copied to clipboard
fun sorted(from: Iterable<Any>, by: Lambda? = null): Iterable<Any>
Link copied to clipboard

Creates a speaker note for a slides document.

Link copied to clipboard
fun sqrt(x: Number): <Error class: unknown class>
Link copied to clipboard
fun string(value: String): <Error class: unknown class>

Creates a string.

Link copied to clipboard
fun subdocumentgraph(): <Error class: unknown class>

Displays a directed graph of subdocuments within the document.

Link copied to clipboard
Link copied to clipboard
fun sum(a: Number, b: Number): Number
Link copied to clipboard
fun sumall(from: Iterable<Any>): Number
Link copied to clipboard
fun table(subTables: Iterable<Any>): Node

Creates a table out of a collection of columns.

Link copied to clipboard

Retrieves a specific column from a table as a collection of values.

Link copied to clipboard

Retrieves all columns from a table as a collection of collections.

Link copied to clipboard
fun tablecompute(column: Int, compute: Lambda, table: MarkdownContent): Node

Performs a computation on a specific column of a table, appending the result to a new cell in the bottom.

Link copied to clipboard
fun tablefilter(column: Int, filter: Lambda, table: MarkdownContent): Node

Filters the rows of a table based on a boolean expression on a specific column.

Link copied to clipboard
fun tableofcontents(title: InlineMarkdownContent? = null, maxdepth: Int = 3, focus: InlineMarkdownContent? = null): Node

Generates a table of contents, based on the headings in the document, organized in a hierarchical structure defined by each heading's depth.

Link copied to clipboard
fun tablesort(column: Int, order: TableSortOrder = TableSortOrder.ASCENDING, table: MarkdownContent): Node

Sorts a table based on the values of a column.

Link copied to clipboard
fun takeif(value: Dynamic, condition: Lambda): Any

Keeps value if condition is true, otherwise returns none.

Link copied to clipboard
fun tan(x: Number): Number
Link copied to clipboard
fun texmacro(name: String, macro: String): <Error class: unknown class>

Creates a new global TeX macro that can be accessed within math blocks.

Link copied to clipboard
fun text(text: InlineMarkdownContent, size: TextTransformData.Size? = null, weight: TextTransformData.Weight? = null, style: TextTransformData.Style? = null, decoration: TextTransformData.Decoration? = null, case: TextTransformData.Case? = null, variant: TextTransformData.Variant? = null, color: Color? = null, url: String? = null): Node

Creates an inline text node with specified formatting and transformation.

Link copied to clipboard
fun textcollapse(full: InlineMarkdownContent, short: InlineMarkdownContent, open: Boolean = false): <Error class: unknown class>

Inserts content in a collapsible text span, whose content can be expanded or collapsed by interacting with it.

Link copied to clipboard
fun theme(color: String? = null, layout: String? = null): Void

Sets the document theme.

Link copied to clipboard
fun third(from: Iterable<Any>): Any
Link copied to clipboard

Creates a to do box, to mark content that needs to be done later, and also logs it to stdout.

Link copied to clipboard
fun totalpages(): <Error class: unknown class>

Displays the total amount of pages in the document.

Link copied to clipboard
fun truncate(x: Number, decimals: Int): Number

Truncates a floating-point number to a specified number of decimal places.

Link copied to clipboard
fun uppercase(string: String): <Error class: unknown class>

Converts a string to uppercase.

Link copied to clipboard
fun var(name: String, value: Dynamic): Void

Defines a new variable or overwrites an existing one.

Link copied to clipboard
fun whitespace(width: Size? = null, height: Size? = null): <Error class: unknown class>

An empty rectangle that adds whitespace to the layout.

Link copied to clipboard
fun xychart(lines: Boolean = true, bars: Boolean = false, x: String? = null, xrange: Range? = null, xtags: Iterable<Any>? = null, y: String? = null, yrange: Range? = null, caption: String? = null, values: Iterable<Any>): Node

Creates a chart diagram on the XY plane.