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
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________