From 5487aec4b0ce32a4a4f8b879516c2fd6f932a020 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 13 Nov 2026 07:41:45 -0500 Subject: [PATCH] Write tab stop lists through shared IDML model --- crates/idml/src/model/resources.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/crates/idml/src/model/resources.rs b/crates/idml/src/model/resources.rs index a94ea5c45..457c617c1 100644 --- a/crates/idml/src/model/resources.rs +++ b/crates/idml/src/model/resources.rs @@ -369,6 +369,22 @@ impl TabStopValues { }) .collect() } + + /// Writes tab-stop records in a `TabList` property. + pub fn to_list(stops: &[Self]) -> El { + let mut list = El::new("TabList").with_attr("type", "list"); + for stop in stops { + list.push( + El::new("ListItem") + .with_attr("type", "record") + .with_child(property("Alignment", "enumeration", stop.alignment.clone())) + .with_child(property("AlignmentCharacter", "string", stop.alignment_character.clone())) + .with_child(property("Leader", "string", stop.leader.clone())) + .with_child(property("Position", "unit", crate::value::num(stop.position))), + ); + } + list + } } /// What a style styles.