Peter Münster wrote:

6. problem with \unprotect and \section{}:

\unprotect
\def\...@bla{sec title}
\def\mysection{\section{\...@bla}}
\protect
\starttext
\mySection
bla bla
\stoptext

ERROR: Undefined control sequence.
--- TeX said ---
l.1 \bla
@bla
Cheers, Peter


this is somewhat tricky as the current catcode regime is forgotten; however since we store it in the data structures as metadata we can still use it (i fixed the code to honor this metadata also when recalling a title)

\unprotect

\def\...@bla{sec title}

\def\mysection{{\setcatcodetable\prtcatcodes\section{\...@bla}}}

\protect

so, by explicitly setting the catcode regime (grouped) it will be stored instead of the normal \ctxcatcodes regime;

btw, more fundamental, non crashing fixes will hapen when i get teh detailed list

Hans

--

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to