ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] \setupdelimitedtext and color parameter: only the second delimiter is colored
@ 2025-01-27 19:50 garulfo
  2025-01-27 20:45 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: garulfo @ 2025-01-27 19:50 UTC (permalink / raw)
  To: ntg-context

Is this the expected behaviour?
>From an observation from https://wiki.contextgarden.net/Text_blocks/Environments/Quotes#Directly

\starttext

\quote{Some text}

\setupdelimitedtext
  [quote]
  [color=red]
\quote{Some text}

\setupdelimitedtext
  [quote]
  [symcolor=red]
\quote{Some text}

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

* [NTG-context] Re: \setupdelimitedtext and color parameter: only the second delimiter is colored
  2025-01-27 19:50 [NTG-context] \setupdelimitedtext and color parameter: only the second delimiter is colored garulfo
@ 2025-01-27 20:45 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2025-01-27 20:45 UTC (permalink / raw)
  To: ntg-context

Am 27.01.2025 um 20:50 schrieb garulfo@azules.eu:
> Is this the expected behaviour?

I don't think so because not all methods show this behaviour.

%%%% begin example
\starttext

\setupdelimitedtext [quote] [color=red]

\quote{Some text}

\setupdelimitedtext [quote] [location=paragraph]

\quote{Some text}

\setupdelimitedtext [quote] [method=font]

\quote{Some text}

\stoptext
%%%% end example

To fix the color problem move the style/color activation above of the 
symbol placement.

%%%% begin patch: typo-del.mkxl
\def\typo_delimited_fontdriven
   {\dontleavehmode
    \begingroup
  
\dostarttaggedchained\t!delimited\currentparentdelimitedtext\currentdelimitedtext\??delimitedtext
+  \usedelimitedtextstyleandcolor\c!style\c!color
    \usedlanguageparameter{\c!left\currentparentdelimitedtext}% was: 
\currentdelimitedtext
-  \usedelimitedtextstyleandcolor\c!style\c!color
    \typo_delimited_start_content
    \bgroup
    \aftergroup\typo_delimited_fontdriven_e
    \let\next=}

\def\typo_delimited_quoted
   {\dontleavehmode
    \begingroup
  
\dostarttaggedchained\t!delimited\currentparentdelimitedtext\currentdelimitedtext\??delimitedtext
+  \usedelimitedtextstyleandcolor\c!style\c!color
    \typo_delimited_handle_left\c!left
-  \usedelimitedtextstyleandcolor\c!style\c!color
    \typo_delimited_start_content
    \bgroup
    \aftergroup\typo_delimited_quoted_e
    \let\next=}
%%%% end patch

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
___________________________________________________________________________________

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

end of thread, other threads:[~2025-01-27 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-27 19:50 [NTG-context] \setupdelimitedtext and color parameter: only the second delimiter is colored garulfo
2025-01-27 20:45 ` [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).