Skip to main content

def_register

Function def_register 

Source
pub fn def_register<T: Into<RegisterValue>>(
    cs: Token,
    parameters: Option<Parameters>,
    value: T,
    options: Option<RegisterOptions>,
) -> Result<()>
Expand description

Defines a register with an initial value.

(a Number, Dimension, Glue, MuGlue or Tokens — I haven’t handled Box’s yet). Usually, the prototype is just the control sequence, but registers are also handled by prototypes like \count{Number}. DefRegister arranges that the register value can be accessed when a numeric, dimension, … value is being read, and also defines the control sequence for assignment.