# ChatMathRenderer

Package: `@threadplane/angular/chat/math` · 0.3.7

Reference: /docs/api/angular/chat/math/ChatMathRenderer

```typescript
import { ChatMathRenderer } from '@threadplane/angular/chat/math';
```

## ChatMathRenderer

Renders LaTeX with the application's KaTeX. `render` returns the KaTeX HTML
string, or null when math is not provided, KaTeX has not loaded yet or failed
to, or the LaTeX is invalid: the view then renders the raw `$…$` source.

```typescript
export declare class ChatMathRenderer  {
  loaded(): Promise<void>;
  readonly ready: import("@angular/core").WritableSignal<boolean>;
  render(latex: string, displayMode: boolean): string | null;
}
```

### loaded · overload 1

Starts the load once and resolves when it has settled. Tests await it.

```typescript
loaded(): Promise<void>;
```

### ready

Flips to true once KaTeX has loaded. The math view reads it as a signal
dependency, so math that fell back to raw source while KaTeX was loading
re-renders once it is available.

```typescript
readonly ready: import("@angular/core").WritableSignal<boolean>;
```

### render · overload 1

```typescript
render(latex: string, displayMode: boolean): string | null;
```