ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Combine \setupdelimitedtext with an author (define custom variable?)
@ 2024-06-06 10:30 Gerion Entrup
  2024-06-06 11:51 ` [NTG-context] " Hans Hagen via ntg-context
  2024-06-06 14:34 ` Wolfgang Schuster
  0 siblings, 2 replies; 9+ messages in thread
From: Gerion Entrup @ 2024-06-06 10:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1116 bytes --]

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.

Best,
Gerion


[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-06-18  8:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-06 10:30 [NTG-context] Combine \setupdelimitedtext with an author (define custom variable?) Gerion Entrup
2024-06-06 11:51 ` [NTG-context] " Hans Hagen via ntg-context
2024-06-06 22:36   ` Gerion Entrup
2024-06-06 14:34 ` Wolfgang Schuster
2024-06-06 14:50   ` Hans Hagen via ntg-context
2024-06-06 20:07   ` Gerion Entrup
2024-06-17 11:04   ` Gerion Entrup
2024-06-17 19:20     ` Wolfgang Schuster
2024-06-18  7:57       ` Gerion Entrup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).