tiny.zen.math
Defined in tiny.zen.
API (8)
Actions
Public operations.
Types and contracts
Public types and contracts.
Namespaces
Public namespaces.
Source
Source: lib/zen/src/math/root.zig
zig
const std = @import("std");pub const mathml = @import("mathml.zig");pub const parse = @import("parse.zig");pub const symbol = @import("symbol.zig");pub const token = @import("token.zig");pub const Diagnostic = parse.Diagnostic;pub const Error = parse.Error;const Allocator = std.mem.Allocator;pub fn renderInline(out: *std.ArrayList(u8), allocator: Allocator, source: []const u8, diagnostic: ?*Diagnostic) Error!void { try render(out, allocator, source, "<math>", diagnostic);}pub fn renderDisplay(out: *std.ArrayList(u8), allocator: Allocator, source: []const u8, diagnostic: ?*Diagnostic) Error!void { try render(out, allocator, source, "<math display=\"block\">", diagnostic);}fn render(out: *std.ArrayList(u8), allocator: Allocator, source: []const u8, open_tag: []const u8, diagnostic: ?*Diagnostic) Error!void { var parsed = try parse.parse(allocator, source, diagnostic); defer parsed.deinit(); try out.appendSlice(allocator, open_tag); try mathml.append(out, allocator, parsed.root); try out.appendSlice(allocator, "</math>");}Source: lib/zen/src/root.zig:29
zig
/// TeX-like expression parsing and MathML rendering.pub const math = @import("math/root.zig");Audit
| Definitions | 3 |
|---|---|
| Public names | 3 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |