ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] applying style to frame content
@ 2024-05-14  7:57 seyal.zavira
  2024-05-14 10:51 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: seyal.zavira @ 2024-05-14  7:57 UTC (permalink / raw)
  To: ntg-context

Hi all,

what is the better way to apply a metapost effect to a piece of any structure text
for example when defining footnotes, frames , etc.
i use this method for frames:

this is my MWE:
\defineframed[Myframe][frame=off]
\starttexdefinition spaces protected Mystyle #1
   \startMPcode
     picture tt ; tt:= lmt_outline [
       kind = "path",
       text = "\Myframe{#1}",
     ];
   fill
     for i within tt : pathpart i && endfor cycle
     withshademethod "linear"
     withshadedirection up
     withshadecolors (red,blue);
   \stopMPcode
\stoptexdefinition

\starttext
\Mystyle{hello}
\stoptext


but what is the proper way if i want to use this style as simple as \tfb in definition of this structures? such as:
\defineframed[Myframe][frame=off,style=\tfb\Mystyle,]

Thanks in advance.
___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2024-05-14 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-14  7:57 [NTG-context] applying style to frame content seyal.zavira
2024-05-14 10:51 ` [NTG-context] " Wolfgang Schuster

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).