MCPcopy Create free account
hub / github.com/TruthHun/BookStack / binrelClass

Function binrelClass

static/katex/katex.mjs:9942–9954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9940 mathmlBuilder: mathmlBuilder$4
9941});
9942const binrelClass = arg => {
9943 // \binrel@ spacing varies with (bin|rel|ord) of the atom in the argument.
9944 // (by rendering separately and with {}s before and after, and measuring
9945 // the change in spacing). We'll do roughly the same by detecting the
9946 // atom type directly.
9947 const atom = arg.type === "ordgroup" && arg.body.length ? arg.body[0] : arg;
9948
9949 if (atom.type === "atom" && (atom.family === "bin" || atom.family === "rel")) {
9950 return "m" + atom.family;
9951 } else {
9952 return "mord";
9953 }
9954}; // \@binrel{x}{y} renders like y but as mbin/mrel/mord if x is mbin/mrel/mord.
9955// This is equivalent to \binrel@{x}\binrel@@{y} in AMSTeX.
9956
9957defineFunction({

Callers 2

handlerFunction · 0.70
katex.mjsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected