Am Donnerstag, 6. Juni 2024, 13:51:53 MESZ schrieb Hans Hagen via ntg-context:
On 6/6/2024 12:30 PM, Gerion Entrup wrote:
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.
not all constructs hav ethese user variables (yet)
i'll add an option for arguments tostart/stop so that you can do
\starttext
\definedelimitedtext [dextract] [blockquote] [leftmargin=1.5pc, style=italic, before=\setupindenting[next], after=\setups{extract:whatever}]
\definestartstop [extract] [arguments=yes, before=\setups{extract:start}, after=\setups{extract:stop}]
\startsetups extract:start \startdextract \stopsetups
\startsetups extract:stop \startstopparameter{author} \stopdextract \blank[1ex,samepage] \hrule \blank[1ex,samepage] \dontleavehmode \wordright{\itx\startstopparameter{author}} \stopsetups
\starttext
\startextract[author=René Descartes] Cogito ergo sum. \stopextract
\stoptext
but first i want Wolfgang to check the patch,
For me, Wolfgang's answer fulfills all my needs. So, from my point of view, this is not needed anymore. Thank you for your effort anyway! Gerion