# OMD Documentation

# OMD Library API Reference

> This is the complete API reference for the OMD (Open Math Display) library. Use the table of contents below to navigate to the detailed documentation for each module and class.

## Table of Contents

The API is organized into the following categories for clarity:

Category | Description
--- | ---
Core Components | The main entry points for rendering and managing expressions.
Node Types | The building blocks of all mathematical expressions.
UI Components | Interactive components for user interfaces.
Helper Utilities | Utility functions for common tasks like node creation and visualization.
Configuration | Modules for managing the library's settings and behavior.
Simplification | The expression simplification engine and its components.

### Core Components

The foundational classes for interacting with the OMD library.

- `omdNode`: The abstract base class for all mathematical nodes in the expression tree.
- `omdDisplay`: A component for rendering a single, auto-centered mathematical expression.
- `omdEquationStack`: A component for managing and displaying a sequence of equation steps.

### Node Types

These classes represent the different parts of a mathematical expression.

- `omdConstantNode`: Represents numeric constants (e.g., `5`, `3.14`).
- `omdVariableNode`: Represents variables (e.g., `x`, `y`).
- `omdBinaryExpressionNode`: Represents binary operations (`+`, `-`, `*`, `/`).
- `omdUnaryExpressionNode`: Represents unary operations (e.g., negation `-x`).
- `omdPowerNode`: Represents exponentiation (`x^2`).
- `omdSqrtNode`: Represents square roots (`√x`).
- `omdRationalNode`: Represents fractions and rational numbers (`x/y`).
- `omdEquationNode`: Represents equations with a left and right side.
- `omdFunctionNode`: Represents mathematical functions (e.g., `sin(x)`).
- `omdParenthesisNode`: Represents expressions enclosed in parentheses.
- `omdEquationSequenceNode`: A container for displaying step-by-step solutions.
- `omdOperationDisplayNode`: Represents visual operation hints.
- `omdGroupNode`: A container for grouping related nodes.

### UI Components

Interactive components for building math interfaces.

- `omdToolbar`: A customizable toolbar for mathematical operations.
- `omdStepVisualizer`: Component for visualizing step-by-step solutions.
- `omdStepVisualizerHighlighting`: Manages highlighting of nodes in step visualizations.
- `omdStepVisualizerLayout`: Handles layout and positioning of step visualizer elements.
- `omdStepVisualizerTextBoxes`: Manages interactive text boxes for step explanations.
- `omdStepVisualizerInteractiveSteps`: Creates interactive step elements for explanations.

### Helper Utilities

- `omdHelpers`: Utility functions for node creation.
- `omdUtilities`: General utilities for AST mapping and text bounds.
- `omdStepVisualizerNodeUtils`: Utilities for node operations in step visualizations.
- `omdTreeDiff`: Utilities for comparing expression trees.

### Configuration

- `omdConfigManager`: The main object for managing library configuration.
- `Configuration Options`: A detailed list of all available configuration settings.

### Simplification

- `omdSimplification`: The main simplification module.
- `omdSimplificationEngine`: Core simplification engine.
- `Simplification Rules`: Available simplification rules.
- `Simplification Utilities`: Helper functions for simplification rules.

## See Also

- User Guide: Getting started, usage, and tutorials (in progress)
- Examples: A directory of live, interactive examples.

↑ Top