Re: [NTG-context] verb-c and tabulator width

2006-04-26 Thread nico
On Wed, 26 Apr 2006 21:26:08 +0200 (CEST), Peter Münster <[EMAIL PROTECTED]>  
wrote:

> On Wed, 26 Apr 2006, nico wrote:
>
>> On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster  
>> <[EMAIL PROTECTED]>
>> wrote:
>>
>> > One (probably there will come more) question:
>> > How could I adjust the width of the tabulator?
>>
>> Use the tab option (not specific to C):
>
> Thanks! In fact I should have looked into texshow instead of relying on  
> the
> old \chardef\spacespertab=...
>
> I'm sorry, here comes already my second problem:
>
> \usemodule[verb-c]
> \setupcolors[state=start]
> \setuptyping[option=C,tab=4]
> \starttext
> Contents of file \type{test.c}:
> \startC
> /** Doing this and that.
>   \param i the index */
> void do_this(int i){
>   int bla;
> }
> \stopC
>
> Here we get \quotation{\type{! Missing number, treated as zero.}}:
> \typefile{test.c}
> \stoptext
>
> Could you help again?

Sorry, this time I cannot help. I think it's a bug in verb-c that makes a  
mess with standard C comments on several lines. C++/ISO C99 comments (//)  
seem correctly handled.

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] verb-c and tabulator width

2006-04-26 Thread Peter Münster
On Wed, 26 Apr 2006, nico wrote:

> On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster <[EMAIL PROTECTED]>  
> wrote:
> 
> > One (probably there will come more) question:
> > How could I adjust the width of the tabulator?
> 
> Use the tab option (not specific to C):

Thanks! In fact I should have looked into texshow instead of relying on the
old \chardef\spacespertab=...

I'm sorry, here comes already my second problem:

\usemodule[verb-c]
\setupcolors[state=start]
\setuptyping[option=C,tab=4]
\starttext
Contents of file \type{test.c}:
\startC
/** Doing this and that.
\param i the index */
void do_this(int i){
int bla;
}
\stopC

Here we get \quotation{\type{! Missing number, treated as zero.}}:
\typefile{test.c}
\stoptext

Could you help again?
Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] verb-c and tabulator width

2006-04-26 Thread nico
On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster <[EMAIL PROTECTED]>  
wrote:

> Hello,
> thanks to Nikolai for the verb-c module!
>
> One (probably there will come more) question:
> How could I adjust the width of the tabulator?

Use the tab option (not specific to C):

\usemodule[verb-c]
\setupcolors[state=start]
\starttext

\startC[tab=2]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC

\startC[tab=4]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC

\startTEX[tab=8]
\startC[tab=4]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC
\stopTEX

\stoptext

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] verb-c and tabulator width

2006-04-26 Thread Peter Münster
Hello,
thanks to Nikolai for the verb-c module!

One (probably there will come more) question:
How could I adjust the width of the tabulator?

It seems to be always one space inside \startC...\stopC :

\usemodule[verb-c]
\chardef\spacespertab=4
\starttext
\starttyping
int main(){
int i;
}
\stoptyping
\startC
int main(){
int i;
}
\stopC
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context