Expand description
Lower #set directives and coerce directive values.
Functionsยง
- coerce_
positive_ ๐length - Coerce a
#image(width|height: ...)argument to a strictly positive length in points. Bare numerics resolve as pt for ergonomics. - coerce_
value ๐ - Coerce a parser literal to the type required by the target slot.
Length values are resolved to PDF points using
em_ptforemliterals. - describe_
value ๐ - int_
to_ ๐f64 #setliterals only accept i64 values that fit comfortably in f64โs mantissa; cap at ยฑ2^53 so the cast is exact.- length_
to_ ๐pt - lower_
set_ ๐arg - Convert one parser-level
SetArginto an attribute on the Raw node representing this#setdirective. Emits semantic diagnostics (MOS0015unknown key,MOS0020type mismatch,MOS0027sanity floor) and updatesmetadata/current_text_size_ptas a side effect. - lower_
set_ ๐directive - Lower a
#set name(...)directive into aRawnode carrying the resolved attribute payload. The split exists so the dispatch inEvaluator::evaluateonly has to thread state through three directive-shaped helpers instead of one large match arm. - sanity_
floor_ ๐warning - set_
node ๐