* verb-c and tabulator width
@ 2006-04-26 17:43 Peter Münster
2006-04-26 18:25 ` nico
0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2006-04-26 17:43 UTC (permalink / raw)
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: verb-c and tabulator width
2006-04-26 17:43 verb-c and tabulator width Peter Münster
@ 2006-04-26 18:25 ` nico
2006-04-26 19:26 ` Peter Münster
0 siblings, 1 reply; 4+ messages in thread
From: nico @ 2006-04-26 18:25 UTC (permalink / raw)
On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster <pmlists@free.fr>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: verb-c and tabulator width
2006-04-26 18:25 ` nico
@ 2006-04-26 19:26 ` Peter Münster
2006-04-26 20:14 ` nico
0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2006-04-26 19:26 UTC (permalink / raw)
On Wed, 26 Apr 2006, nico wrote:
> On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster <pmlists@free.fr>
> 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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: verb-c and tabulator width
2006-04-26 19:26 ` Peter Münster
@ 2006-04-26 20:14 ` nico
0 siblings, 0 replies; 4+ messages in thread
From: nico @ 2006-04-26 20:14 UTC (permalink / raw)
On Wed, 26 Apr 2006 21:26:08 +0200 (CEST), Peter Münster <pmlists@free.fr>
wrote:
> On Wed, 26 Apr 2006, nico wrote:
>
>> On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster
>> <pmlists@free.fr>
>> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-04-26 20:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26 17:43 verb-c and tabulator width Peter Münster
2006-04-26 18:25 ` nico
2006-04-26 19:26 ` Peter Münster
2006-04-26 20:14 ` nico
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).