[NTG-context] Trouble with # character in TABLE environment...& trouble with \starttyping environment too

Hans Hagen pragma at wxs.nl
Wed Aug 25 13:34:33 CEST 2010


On 25-8-2010 12:07, Jaroslav Hajtmar wrote:
> Ok. Thanx Hans.
> I solve it with \#\type{patt} it look like as have it and therefore isnt
> problem.
>
> BUT now I have problem with \starttyping - \stoptyping environment too.
>
> here is example:
>
> This works OK...
>
> \starttyping
> c = re.compile([[
> longstring <- ('[' {:eq: '='* :} '[' <close>) => void
> close <- ']' =eq ']' / . <close>
> ]], {void = function () return true end})
>
> \stoptyping
>
>
> But when I add last row, then stop work and get error message:
>
> \starttyping
> c = re.compile([[
> longstring <- ('[' {:eq: '='* :} '[' <close>) => void
> close <- ']' =eq ']' / . <close>
> ]], {void = function () return true end})
>
> print(c:match'[==[]]===]]]]==]===[]') --> 17
> \stoptyping
>
>
> Message error surprised me:

mkiv happens to use === itself so either change your example to use 4 
='s or adapt this:

\unprotect
     \def\!!bs{[=====[}
     \def\!!es{]=====]}
\protect

(i might even move to == instead of === as it's saves tokens)



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list