On 6/6/2024 4:34 PM, Wolfgang Schuster wrote:
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 ah, i start forgetting about these mechanisms ... i added this example to th etest suite
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------