From b5c34c154fbb587d67b218ba979d2210659e66a4 Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Wed, 31 Jul 2024 22:46:24 +0200 Subject: [PATCH] fixed ignored comment width with sync --- gallery/example2.pdf | Bin 42282 -> 42322 bytes gallery/example2.typ | 4 ++-- src/renderer.typ | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gallery/example2.pdf b/gallery/example2.pdf index d1d5ae5bed16dc6af1cd76daf52367bd40d05304..68205a35e214abfb812838e8d87813e8bb15e2e7 100644 GIT binary patch delta 2374 zcmZ`*Yd8}O8#ZT}$~jVv94e!Y%^b2smYgXGB`hS;9AcPeC=DT#oDXxDoWdsOnh=dN zIUl1agrqrSrmw#DyS^Xa`@PSv`?~Kx&-2{(^;}OWgZn*$yGkR58xA8?om0YJne?7O z?Z*#a%fHK1CUohsTdal8-w-B9MRHPS^IMoHk$WBBV!FmO1`8m;cH>T5O=B=?M+Or2UbiE!NMvUt{*eA`5AL zryE=DuB+CNId$^O2Y1+IA)Su+4Zyn})icW{-wwVDF60CbbA44DRx3$hY&?I*|GFe$ z6-o7~+|yv!PUL8(Ock zI!!~|&dBw(F0?%+gg<00Ntu1lb^JT17SZLzP7lg9JSB{(GnB7#b#2cq)RJprdEi zUi@^NVL9ptgU5Lnh*LV>+5<8J54xtIZfqf&j?L?us0TEYAa7SzJ6Ei3M&yRY&;#waP zB2dJzoKhl<+!m4WG_q!~tKt(ehEr~N3GRc>m_(!Yjy?Sa`39T2zu6vPaU%?bVcaIY zf0;OC(e*U+@sfR})WE6z^AF@lVwBWOZPtD4IGB$emmm2$43-HEUI4>PRf9@ZSrP5{PtUt7#`Q!-T6<4KW>3`T`0j}bC4Teg}lXlsbC zvgTm*8l-it5kt_DYVup>d5nB-u)bpRAtx|*fsOb3rUG5F@aZ*C(QKQf;lxnfY)LD` z6gax8klecZc>3b&-lHna*w|zY@l#&K(pg0twZd*>%58PA8{IK-qa?UZaB;J?rWe!X zLpxoAuvekD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G*HLTzYl`c%5C(_!PVof2 zL$iW}GTp7K^|3!7Nj<;=M;i)Qu~eL8Uapu1zZk8ovR%^3oR+UdvgfDYWg`;$g>8k%f}iu2hypjlH9mR z(|IYu-Z-srFAu~~&cg5FZ2{z)p>8~AgAH5veXe-xm_g$iLvHq*$}Xq3MS|(&rzwzI z)UdlmW`4RMLGZI@pd1HcD4nls5F=U3ZkURy%*S1=gh^vZV<)mEDl6ewXt6+MK4&aT zrk#7_pmS?Mh3z7Z7j!Bzf-1@hcK5kW3kv%qZF6KOS3L-mN}{cAYxIq$zn)zUlwLT`tXgCW<+d&=n5+ShaJE32ZUtLWKi@}#HR7vZS3O6#e0%Z<&pQR z+SfHC^d`AUGUyu(>o;^1dIZ*$CUcsDE#xc{?VaKC4PGh=uiZ%^s?fV4UvgwD!>A9t zpgrcysMmXPpB3`%93$D%w@>`W-6`%`kmLd~89Rd0b^Xz`wTIIWJ@G z;0i>bbO+9SNbIlH5Oh5GsOtJO#s6+HE&jiMZCdr1`Q-}>s@BAwVh{2kLdxdSK}uoM z90hb_-D;jrbl8+m^cIEF9Y)*fawfq~76yW5f9{U1j19g@`01LSDfA@&@@h9Mq+$?1 zm`GzUmotCik^_*(9h^e+^OG;iuHU8&@EM%2Nd`w@V=pPujo+lO@ng!P+2rDIev=bF zEnIwjE8n+YV&g;<6h9E(Eyjhk*V+yT-Ej3okY38$}Dnf_11n7^qyI#~EPqhg}W z%>n|vaREN@r*NL=2)dAI__T39qW+&V0# zf`tDQnIlm2)M{m81nM6I4M!pWxd@Fw!|4yJUEKfOppA|3x1j&({Tm7b+S&r+6VApZ UkmAD60nrFE3p5Z4b@Fij4-Ec8c>n+a diff --git a/gallery/example2.typ b/gallery/example2.typ index c078461..9a49d5d 100644 --- a/gallery/example2.typ +++ b/gallery/example2.typ @@ -61,8 +61,8 @@ _gap() _sync({ - _seq("bob", "alice") - _seq("bob", "craig") + _seq("bob", "alice", comment: "Synched", comment-align: "start") + _seq("bob", "craig", comment: "Synched", comment-align: "start") }) _gap() diff --git a/src/renderer.typ b/src/renderer.typ index 8953a40..f55aa8f 100644 --- a/src/renderer.typ +++ b/src/renderer.typ @@ -20,6 +20,16 @@ let pars-i = get-participants-i(participants) let cells = () + // Unwrap syncs + let i = 0 + while i < elements.len() { + let elmt = elements.at(i) + if elmt.type == "sync" { + elements = elements.slice(0, i + 1) + elmt.elmts + elements.slice(i + 1) + } + i += 1 + } + // Compute max lifeline levels for elmt in elements { if elmt.type == "seq" {