ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Trouble with percent character in ConTeXt text (programm code typing)
@ 2010-08-24 13:53 Jaroslav Hajtmar
  2010-08-24 14:15 ` Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: Jaroslav Hajtmar @ 2010-08-24 13:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello all...

I am converting any manual from HTML to ConTeXt.
There are a lot of programm code. and in the code is very often % 
character.
Ther is no problem in \startyping - \stoptyping environment, but I need 
using this in text ... for example

The sequence \type{%0} stands for the whole match. The sequence 
\type{%%} stands for a single~\type{%}.
or
For instance, the call \type{string.format('%q', 'a string with "quotes" 
and \n new line')} will produce the string:
...
etc..

1.

It is clear that this can not work, but is there any satisfactory solution??
Something like \startypingintext  ...  \stoptypingintext  i.e. intext 
typing environment..


2.
in html code is often emphasis found inside the program code
for example:
<code>\<em>ddd</em></code>,

Maybe it's a dumb question, but may be inside emphasis inside verbatim 
(\startyping - \stoptyping) environment??

Thanx Jaroslav

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with percent character in ConTeXt text (programm code typing)
  2010-08-24 13:53 Trouble with percent character in ConTeXt text (programm code typing) Jaroslav Hajtmar
@ 2010-08-24 14:15 ` Wolfgang Schuster
  2010-08-24 14:30   ` Jaroslav Hajtmar
  2010-08-25  7:27   ` Trouble with # character in TABLE environment Jaroslav Hajtmar
  0 siblings, 2 replies; 13+ messages in thread
From: Wolfgang Schuster @ 2010-08-24 14:15 UTC (permalink / raw)
  To: hajtmar, mailing list for ConTeXt users

  Am 24.08.10 15:53, schrieb Jaroslav Hajtmar:
> Hello all...
>
> I am converting any manual from HTML to ConTeXt.
> There are a lot of programm code. and in the code is very often % 
> character.
> Ther is no problem in \startyping - \stoptyping environment, but I 
> need using this in text ... for example
>
> The sequence \type{%0} stands for the whole match. The sequence 
> \type{%%} stands for a single~\type{%}.
> or
> For instance, the call \type{string.format('%q', 'a string with 
> "quotes" and \n new line')} will produce the string:
> ...
> etc..
>
> 1.
>
> It is clear that this can not work, but is there any satisfactory 
> solution??
> Something like \startypingintext  ...  \stoptypingintext  i.e. intext 
> typing environment..

What prevents you from testting this yourself, \type{%} produce a '%' in 
the text.

> 2.
> in html code is often emphasis found inside the program code
> for example:
> <code>\<em>ddd</em></code>,
>
> Maybe it's a dumb question, but may be inside emphasis inside verbatim 
> (\startyping - \stoptyping) environment??

Yes, it's possible to use style commands in verbatim mode but the 
mechanism in MkII and MkIV
are different and it's important to know which system you use.

Wolfgang

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with percent character in ConTeXt text (programm code typing)
  2010-08-24 14:15 ` Wolfgang Schuster
@ 2010-08-24 14:30   ` Jaroslav Hajtmar
  2010-08-25  7:27   ` Trouble with # character in TABLE environment Jaroslav Hajtmar
  1 sibling, 0 replies; 13+ messages in thread
From: Jaroslav Hajtmar @ 2010-08-24 14:30 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

Very sorry ... I compiled (it be set for simplify work :-(  ) main 
project, not my minimal example... I found error in code on the same row..
after several hours is difficult for me to look for errors
Thank you to help and sorry...

Jaroslav



Dne 24.8.2010 16:15, Wolfgang Schuster napsal(a):
>  Am 24.08.10 15:53, schrieb Jaroslav Hajtmar:
>> Hello all...
>>
>> I am converting any manual from HTML to ConTeXt.
>> There are a lot of programm code. and in the code is very often % 
>> character.
>> Ther is no problem in \startyping - \stoptyping environment, but I 
>> need using this in text ... for example
>>
>> The sequence \type{%0} stands for the whole match. The sequence 
>> \type{%%} stands for a single~\type{%}.
>> or
>> For instance, the call \type{string.format('%q', 'a string with 
>> "quotes" and \n new line')} will produce the string:
>> ...
>> etc..
>>
>> 1.
>>
>> It is clear that this can not work, but is there any satisfactory 
>> solution??
>> Something like \startypingintext  ...  \stoptypingintext  i.e. intext 
>> typing environment..
>
> What prevents you from testting this yourself, \type{%} produce a '%' 
> in the text.
>
>> 2.
>> in html code is often emphasis found inside the program code
>> for example:
>> <code>\<em>ddd</em></code>,
>>
>> Maybe it's a dumb question, but may be inside emphasis inside 
>> verbatim (\startyping - \stoptyping) environment??
>
> Yes, it's possible to use style commands in verbatim mode but the 
> mechanism in MkII and MkIV
> are different and it's important to know which system you use.
>
> Wolfgang
>
>

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Trouble with # character in TABLE environment...
  2010-08-24 14:15 ` Wolfgang Schuster
  2010-08-24 14:30   ` Jaroslav Hajtmar
@ 2010-08-25  7:27   ` Jaroslav Hajtmar
  2010-08-25  9:46     ` Hans Hagen
  1 sibling, 1 reply; 13+ messages in thread
From: Jaroslav Hajtmar @ 2010-08-25  7:27 UTC (permalink / raw)
  Cc: mailing list for ConTeXt users

Hello, all

Why is a problem with character # inside TABLE??
\type{#XXX} is without problem but inside TABLE is a problem with 
compilation

It works:
\bTABLE
\bTR
\bTD \type{\#patt}\eTD
\eTR
\eTABLE


Isnt works:
\bTABLE
\bTR
\bTD \type{#patt}\eTD
\eTR
\eTABLE

Is there solving the problem??
Jaroslav



Dne 24.8.2010 16:15, Wolfgang Schuster napsal(a):
>  Am 24.08.10 15:53, schrieb Jaroslav Hajtmar:
>> Hello all...
>>
>> I am converting any manual from HTML to ConTeXt.
>> There are a lot of programm code. and in the code is very often % 
>> character.
>> Ther is no problem in \startyping - \stoptyping environment, but I 
>> need using this in text ... for example
>>
>> The sequence \type{%0} stands for the whole match. The sequence 
>> \type{%%} stands for a single~\type{%}.
>> or
>> For instance, the call \type{string.format('%q', 'a string with 
>> "quotes" and \n new line')} will produce the string:
>> ...
>> etc..
>>
>> 1.
>>
>> It is clear that this can not work, but is there any satisfactory 
>> solution??
>> Something like \startypingintext  ...  \stoptypingintext  i.e. intext 
>> typing environment..
>
> What prevents you from testting this yourself, \type{%} produce a '%' 
> in the text.
>
>> 2.
>> in html code is often emphasis found inside the program code
>> for example:
>> <code>\<em>ddd</em></code>,
>>
>> Maybe it's a dumb question, but may be inside emphasis inside 
>> verbatim (\startyping - \stoptyping) environment??
>
> Yes, it's possible to use style commands in verbatim mode but the 
> mechanism in MkII and MkIV
> are different and it's important to know which system you use.
>
> Wolfgang
>
>

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with # character in TABLE environment...
  2010-08-25  7:27   ` Trouble with # character in TABLE environment Jaroslav Hajtmar
@ 2010-08-25  9:46     ` Hans Hagen
  2010-08-25 10:07       ` Trouble with # character in TABLE environment...& trouble with \starttyping environment too Jaroslav Hajtmar
  2010-08-25 10:42       ` [***SPAM***] Re: Trouble with # character in TABLE environment Peter Münster
  0 siblings, 2 replies; 13+ messages in thread
From: Hans Hagen @ 2010-08-25  9:46 UTC (permalink / raw)
  To: hajtmar, mailing list for ConTeXt users

On 25-8-2010 9:27, Jaroslav Hajtmar wrote:
> Hello, all
>
> Why is a problem with character # inside TABLE??
> \type{#XXX} is without problem but inside TABLE is a problem with
> compilation
>
> It works:
> \bTABLE
> \bTR
> \bTD \type{\#patt}\eTD
> \eTR
> \eTABLE
>
>
> Isnt works:
> \bTABLE
> \bTR
> \bTD \type{#patt}\eTD
> \eTR
> \eTABLE
>
> Is there solving the problem??

the next version will have \asciimode which will make all those chars 
regular characters (apart from % \ { })

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with # character in TABLE environment...& trouble with \starttyping environment too
  2010-08-25  9:46     ` Hans Hagen
@ 2010-08-25 10:07       ` Jaroslav Hajtmar
  2010-08-25 11:34         ` Hans Hagen
  2010-08-25 10:42       ` [***SPAM***] Re: Trouble with # character in TABLE environment Peter Münster
  1 sibling, 1 reply; 13+ messages in thread
From: Jaroslav Hajtmar @ 2010-08-25 10:07 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

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:

systems         : begin file lpeg.tex at line 32
! LuaTeX error <main ctx instance>:7: ')' expected (to close '(' at line 
1) near
  ']'.
\dododowithbuffer ...!!bs \detokenize {#1}\!!es )}
                                                    \dododowithbuffer 
\nododo...
l.46 \stoptyping

What system controlling inside \starttyping \ stoptyping environment?

Thanx Jaroslav



Dne 25.8.2010 11:46, Hans Hagen napsal(a):
> On 25-8-2010 9:27, Jaroslav Hajtmar wrote:
>> Hello, all
>>
>> Why is a problem with character # inside TABLE??
>> \type{#XXX} is without problem but inside TABLE is a problem with
>> compilation
>>
>> It works:
>> \bTABLE
>> \bTR
>> \bTD \type{\#patt}\eTD
>> \eTR
>> \eTABLE
>>
>>
>> Isnt works:
>> \bTABLE
>> \bTR
>> \bTD \type{#patt}\eTD
>> \eTR
>> \eTABLE
>>
>> Is there solving the problem??
>
> the next version will have \asciimode which will make all those chars 
> regular characters (apart from % \ { })
>
> -----------------------------------------------------------------
>                                           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
> -----------------------------------------------------------------
>

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* [***SPAM***] Re: Trouble with # character in TABLE environment...
  2010-08-25  9:46     ` Hans Hagen
  2010-08-25 10:07       ` Trouble with # character in TABLE environment...& trouble with \starttyping environment too Jaroslav Hajtmar
@ 2010-08-25 10:42       ` Peter Münster
  2010-08-25 11:26         ` Hans Hagen
  1 sibling, 1 reply; 13+ messages in thread
From: Peter Münster @ 2010-08-25 10:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Aug 25 2010, Hans Hagen wrote:

> the next version will have \asciimode which will make all those
> chars regular characters (apart from % \ { })

Why not "%"?
Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: [***SPAM***] Re: Trouble with # character in TABLE environment...
  2010-08-25 10:42       ` [***SPAM***] Re: Trouble with # character in TABLE environment Peter Münster
@ 2010-08-25 11:26         ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2010-08-25 11:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 25-8-2010 12:42, Peter Münster wrote:
> On Wed, Aug 25 2010, Hans Hagen wrote:
>
>> the next version will have \asciimode which will make all those
>> chars regular characters (apart from % \ { })
>
> Why not "%"?

debatable but it's a comment

things like this can be discussed extensively at the upcoming context 
meeting

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with # character in TABLE environment...& trouble with \starttyping environment too
  2010-08-25 10:07       ` Trouble with # character in TABLE environment...& trouble with \starttyping environment too Jaroslav Hajtmar
@ 2010-08-25 11:34         ` Hans Hagen
  2010-08-25 18:49           ` Jaroslav Hajtmar
  2010-08-25 18:59           ` Aditya Mahajan
  0 siblings, 2 replies; 13+ messages in thread
From: Hans Hagen @ 2010-08-25 11:34 UTC (permalink / raw)
  To: hajtmar, ntg-context@ntg.nl >> mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with # character in TABLE environment...& trouble with \starttyping environment too
  2010-08-25 11:34         ` Hans Hagen
@ 2010-08-25 18:49           ` Jaroslav Hajtmar
  2010-08-25 18:55             ` Hans Hagen
  2010-08-25 18:59           ` Aditya Mahajan
  1 sibling, 1 reply; 13+ messages in thread
From: Jaroslav Hajtmar @ 2010-08-25 18:49 UTC (permalink / raw)
  To: Hans Hagen; +Cc: ntg-context@ntg.nl >> mailing list for ConTeXt users


Thanx Hans,

I did not think that inside \starttyping -- \stoptyping environment 
ConTeXt could do such a check this thing.

Thanks so much. Health Jaroslav

Dne 25.8.2010 13:34, Hans Hagen napsal(a):
> 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
> -----------------------------------------------------------------
>

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with # character in TABLE environment...& trouble with \starttyping environment too
  2010-08-25 18:49           ` Jaroslav Hajtmar
@ 2010-08-25 18:55             ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2010-08-25 18:55 UTC (permalink / raw)
  To: hajtmar; +Cc: ntg-context@ntg.nl >> mailing list for ConTeXt users

On 25-8-2010 8:49, Jaroslav Hajtmar wrote:
>
> Thanx Hans,
>
> I did not think that inside \starttyping -- \stoptyping environment
> ConTeXt could do such a check this thing.

Well, the captured content is passed to the lua end using long strings 
so nothing is processed at that stage.

Of course I could parse for embedded long strings but that a bit over 
the top I think.

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with # character in TABLE environment...& trouble with \starttyping environment too
  2010-08-25 11:34         ` Hans Hagen
  2010-08-25 18:49           ` Jaroslav Hajtmar
@ 2010-08-25 18:59           ` Aditya Mahajan
  2010-08-25 19:03             ` Hans Hagen
  1 sibling, 1 reply; 13+ messages in thread
From: Aditya Mahajan @ 2010-08-25 18:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 25 Aug 2010, Hans Hagen wrote:

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

Is there a more robust way to do this? Perhaps making the number of equal 
signs user configurable?

Aditya
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Trouble with # character in TABLE environment...& trouble with \starttyping environment too
  2010-08-25 18:59           ` Aditya Mahajan
@ 2010-08-25 19:03             ` Hans Hagen
  0 siblings, 0 replies; 13+ messages in thread
From: Hans Hagen @ 2010-08-25 19:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 25-8-2010 8:59, Aditya Mahajan wrote:

> Is there a more robust way to do this? Perhaps making the number of
> equal signs user configurable?

redefining \!!bs and \!!es is ok as they will not disappear

after all, how often does one use [===[ and ]===] in lua code (in a non 
symmetrical way).

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-08-25 19:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-24 13:53 Trouble with percent character in ConTeXt text (programm code typing) Jaroslav Hajtmar
2010-08-24 14:15 ` Wolfgang Schuster
2010-08-24 14:30   ` Jaroslav Hajtmar
2010-08-25  7:27   ` Trouble with # character in TABLE environment Jaroslav Hajtmar
2010-08-25  9:46     ` Hans Hagen
2010-08-25 10:07       ` Trouble with # character in TABLE environment...& trouble with \starttyping environment too Jaroslav Hajtmar
2010-08-25 11:34         ` Hans Hagen
2010-08-25 18:49           ` Jaroslav Hajtmar
2010-08-25 18:55             ` Hans Hagen
2010-08-25 18:59           ` Aditya Mahajan
2010-08-25 19:03             ` Hans Hagen
2010-08-25 10:42       ` [***SPAM***] Re: Trouble with # character in TABLE environment Peter Münster
2010-08-25 11:26         ` Hans Hagen

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