/// This module defines all handout "objects" /// (problems, theorems, definitions, etc) /// Core render code for all objects (problems, theorems, etc) /// This should never be used directly by client code. /// /// Args: /// - kind: the kind of object to make ("Problem", "Definition", etc) /// - label_name: a string. If provided, generate metadata for this object /// under the given label. Labels must be unique. /// This label can then be used to reference this object. /// /// For example: /// ``` /// #problem(label: "problem1") /// This is @problem1 /// ``` #let _obj_base(kind, ..args, label_name: none) = { counter("obj").step() let n = context counter("obj").get().first() // The complete title text of this object, // like "Problem 5:" or "Theorem: " let obj_content = if args.pos().len() == 0 { [#kind #n:] } else { [#kind #n: #args.pos().at(0)] } // Render the object block( above: 8mm, below: 2mm, text(weight: "bold", obj_content), ) // Generate labeled metadata for this object. // // This can be viewed directly with `#context query(