hook: Hook for custom symbols

View source: R/mathml.R

hookR Documentation

Hook for custom symbols

Description

hook(term, display) unhook(term) hooked(term)

Usage

hook(term, display, quote = TRUE, as.rolog = TRUE)

unhook(term, quote = TRUE, as.rolog = TRUE)

hooked(term)

Arguments

term

an R call or symbol/number. This is the expression to replace.

display

an R call or symbol/number. This is shown instead of term.

quote

(default is TRUE) indicates that term and display should be quoted.

as.rolog

(default is TRUE) indicates that simplified quasi-quotation is to be used.

Value

hook and unhook return TRUE on success. hooked returns the hooked expression or FALSE on failure.

Examples

hook(t0, subscript(t, 0))
hooked(quote(t0))
mathml(quote(t0))
hook(term=quote(t0), display=quote(superscript(t, 0)), quote=FALSE)
mathml(quote(t0))
unhook(t0)
mathml(quote(t0))


mathml documentation built on June 8, 2025, 11:12 a.m.