Hi. Without a concrete use case, this is just How can I have global configuration parameters for a module/package? - #2 by Andrew , but from a different angle.
Generally speaking, you can’t. But with enough hacks you can manually exploit one element for storing relevant/updated field values with a set rule, like here:
#import "../process-styles.typ": merge-strokes, merge-fills
#import "../utility.typ": if-none
#import "../model/mark.typ": mark, marks
#import "map.typ": petroff10
#import "cycle.typ": generic
#let _auto = rgb("#0000A1AA")
#let style = std.circle
#let process-stroke(stroke, color) = {
if stroke == none { return none }
if stroke.paint == _auto {
std.stroke(paint: color, thickness: stroke.thickness, cap: stroke.cap, join: stroke.join, dash: stroke.dash, miter-limit: stroke.miter-limit)
} else {
stroke
}
}
Or use Introduction - The Elembic Handbook .
1 Like