Am Donnerstag, 6. Juni 2024, 16:34:03 MESZ schrieb Wolfgang Schuster: > Gerion Entrup schrieb am 06.06.2024 um 12:30: > > Hi, > > > > I like to achieve something that looks like this: > > ``` > > \definedelimitedtext[extract][blockquote] > > \setupdelimitedtext > > [extract] > > [leftmargin=1.5pc, > > style={\italic}, > > before={\setupindenting[next]}, > > after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{René Descartes} \stopalignment}] > > > > \starttext > > \startextract > > Cogito ergo sum. > > \stopextract > > \stoptext > > ``` > > > > So it should setup a quotation and mentions the author. > > However, here the author is hardcoded within the blockquote. I would like it to use like this: > > ``` > > \definedelimitedtext[extract][blockquote] > > \setupdelimitedtext > > [extract] > > [leftmargin=1.5pc, > > style={\italic}, > > before={\setupindenting[next]}, > > after={\blank[1ex] \hrule \blank[1ex] \startalignment[flushright] \tfx\italic{\getcustomvariable{author}} \stopalignment}] > > > > \starttext > > \startextract[author=René Descartes] > > Cogito ergo sum. > > \stopextract > > \stoptext > > ``` > > > > Is there an easy way to achieve that? > > I tried with \structureuservariable (like possible in \startchapter) but it does not work. > > \startsetups [userdata:extract] > \startnarrower > \setupindenting[next] > \getuserdata > \hairline > \dontleavehmode\wordright{\itx\userdataparameter{author}} > \stopnarrower > \stopsetups > > \defineuserdataalternative > [extract] > [renderingsetup=userdata:extract] > > \defineuserdata > [extract] > [style=italic, > alternative=extract] > > \starttext > > \startextract[author=René Descartes] > Cogito ergo sum. > \stopextract > > \stoptext Really cool! Thank you. If I see it right, this is completely generic, so with this it is possible to define any start stop with completely variable arguments. Gerion