rmd_classes_s7: S7 Class Definitions for RMD Nodes

rmd_classes_s7R Documentation

S7 Class Definitions for RMD Nodes

Description

S7 classes for representing R Markdown AST nodes with automatic validation. All classes inherit from the base rmd_node class and provide type-safe object creation with built-in validation of properties.

Usage

rmd_node()

rmd_ast(nodes = list())

rmd_yaml(yaml = list())

Arguments

nodes

List of rmd_node objects for the AST container

yaml

List containing YAML frontmatter content

Details

The following S7 classes are available for creating R Markdown AST nodes:

Core Classes

  • rmd_node() - Abstract base class for all R Markdown AST nodes. This is the parent class for all specific node types and should not be instantiated directly.

  • rmd_ast() - Container for multiple nodes representing a complete document AST.

Content Nodes

  • rmd_yaml() - YAML frontmatter header containing document metadata.

  • rmd_chunk() - Code chunks with executable code in various engines (R, Python, etc.).

  • rmd_raw_chunk() - Raw code chunks that are not executed.

  • rmd_markdown() - Plain markdown text content.

  • rmd_heading() - Section headings at various levels (1-6).

Code and Inline Elements

  • rmd_code_block() - Fenced code blocks without execution.

  • rmd_code_block_literal() - Code blocks with literal {{...}} attributes.

  • rmd_inline_code() - Inline code spans within markdown text.

  • rmd_shortcode() - Quarto/Pandoc shortcodes for special functionality.

  • rmd_span() - Generic inline spans with attributes.

Structural Elements

  • rmd_fenced_div_open() - Opening tags for fenced divs (:::).

  • rmd_fenced_div_close() - Closing tags for fenced divs (:::).

See Also

rmd_node_utilities for utility functions that work with these S7 objects


parsermd documentation built on Aug. 21, 2025, 5:27 p.m.