On 9/9/2026 5:31 PM, Wolfgang Schuster wrote:
Am 09.09.2026 um 11:38 schrieb Hans Hagen via ntg-context:
\permanent\protected\def\doifelseframed#1%
         {\ifcstok{#1\c!frame      }\v!on \expandafter\firstoftwoarguments
   \orelse\ifcstok{#1\c!frame }\v!closed\expandafter\firstoftwoarguments
   \orelse\ifcstok{#1\c!frame      }\v!round \expandafter\firstoftwoarguments    \orelse\ifcstok{#1\c!topframe   }\v!on \expandafter\firstoftwoarguments    \orelse\ifcstok{#1\c!bottomframe}\v!on \expandafter\firstoftwoarguments    \orelse\ifcstok{#1\c!leftframe  }\v!on \expandafter\firstoftwoarguments    \orelse\ifcstok{#1\c!rightframe }\v!on \expandafter\firstoftwoarguments
   \orelse\ifempty{#1\c!background }\expandafter\secondoftwoarguments
     \else \expandafter\firstoftwoarguments\fi}

Still to simple because it will fail for frame=dash, frame=small etc. (and frame=round doesn't exist).

\permanent\protected\def\doifelseframed#1%
   {\ifcstok{#1\c!frame}\v!closed\expandafter\firstoftwoarguments
   \orelse\ifcsname\??framedtop   #1\c!frame#1\c!topframe  \endcsname\expandafter\firstoftwoarguments  \orelse\ifcsname\??framedbottom#1\c!frame#1\c! bottomframe\endcsname\expandafter\firstoftwoarguments    \orelse\ifcsname\??framedleft  #1\c!frame#1\c!leftframe \endcsname\expandafter\firstoftwoarguments    \orelse\ifcsname\??framedright #1\c!frame#1\c!rightframe \endcsname\expandafter\firstoftwoarguments
  \orelse\ifempty{#1\c!background}\expandafter\secondoftwoarguments
    \else\expandafter\firstoftwoarguments
    \fi}

How likely for captions ... do we also need \v!none here?

\permanent\protected\def\doifelseframed#1%
{\ifcstok{#1\c!frame }\v!on \expandafter\firstoftwoarguments \orelse\ifcstok{#1\c!frame }\v!closed \expandafter\firstoftwoarguments \orelse\ifcstok{#1\c!frame }\v!dash \expandafter\firstoftwoarguments \orelse\ifcstok{#1\c!frame }\v!overlay\expandafter\firstoftwoarguments \orelse\ifcstok{#1\c!frame }\v!small \expandafter\firstoftwoarguments \orelse\ifcstok{#1\c!topframe }\v!on \expandafter\firstoftwoarguments \orelse\ifcstok{#1\c!bottomframe}\v!on \expandafter\firstoftwoarguments \orelse\ifcstok{#1\c!leftframe }\v!on \expandafter\firstoftwoarguments \orelse\ifcstok{#1\c!rightframe }\v!on \expandafter\firstoftwoarguments
   \orelse\ifempty{#1\c!background }\expandafter\secondoftwoarguments
     \else                          \expandafter\firstoftwoarguments\fi}


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
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
___________________________________________________________________________________

Reply via email to