ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \definetyping[C][option=commands] and the tabulator
@ 2005-05-30 20:06 Peter Münster
  2005-05-31 16:13 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2005-05-30 20:06 UTC (permalink / raw)


Hello,
here is a typing-problem:

\definetyping[C][option=commands]
\starttext
With option=commands the tabulator is reduced to one space:
\startC
#include <stdiostream.h>
int main(){
	return 0;
	/BTEX{\em unreachedCode;}/ETEX
}
\stopC
\stoptext

TIA for any help, Peter

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

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

* Re: \definetyping[C][option=commands] and the tabulator
  2005-05-30 20:06 \definetyping[C][option=commands] and the tabulator Peter Münster
@ 2005-05-31 16:13 ` Hans Hagen
  2005-06-02 16:12   ` Peter Münster
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2005-05-31 16:13 UTC (permalink / raw)


Peter Münster wrote:
> Hello,
> here is a typing-problem:
> 
> \definetyping[C][option=commands]
> \starttext
> With option=commands the tabulator is reduced to one space:
> \startC
> #include <stdiostream.h>
> int main(){
> 	return 0;
> 	/BTEX{\em unreachedCode;}/ETEX
> }
> \stopC
> \stoptext

it has to do with the fact that in order to 'count tabs' some parsing has to be 
done and there the /BTEX etc conflicts with this parsing,

now, since your kind of tabbing mostly happens at the beginning of a line, we 
can do something:

\definetyping[C][option=commands,tab=8]

(just a few lines patch); i'll send you the files.

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

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

* Re: \definetyping[C][option=commands] and the tabulator
  2005-05-31 16:13 ` Hans Hagen
@ 2005-06-02 16:12   ` Peter Münster
  2005-06-02 20:36     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2005-06-02 16:12 UTC (permalink / raw)


On Tue, 31 May 2005, Hans Hagen wrote:

> \definetyping[C][option=commands,tab=8]
> 
> (just a few lines patch); i'll send you the files.

Thanks again for your efforts!

Just one last problem with vertical spacing in a frame:

\starttext
\framed[align=lohi]{%
\starttyping
test
\stoptyping
}
\stoptext

Cheers, Peter

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

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

* Re: \definetyping[C][option=commands] and the tabulator
  2005-06-02 16:12   ` Peter Münster
@ 2005-06-02 20:36     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2005-06-02 20:36 UTC (permalink / raw)


Peter Münster wrote:
> On Tue, 31 May 2005, Hans Hagen wrote:
> 
> 
>>\definetyping[C][option=commands,tab=8]
>>
>>(just a few lines patch); i'll send you the files.
> 
> 
> Thanks again for your efforts!
> 
> Just one last problem with vertical spacing in a frame:
> 
> \starttext
> \framed[align=lohi]{%
> \starttyping
> test
> \stoptyping
> }
> \stoptext

you need to

- nil the before/after keys
- make sure that framed constructs a vbox (by setting align)
- get rid of the auto strut

\definetyping[whatever][before=,after=]

\framed[strut=no,align=normal]
{\startwhatever
...
\stopwhatever}

normally one will use \startframedtext ... \stopframedtext in such cases (or the 
textbackground mechanism if you need to spanpages or columns)

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

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

end of thread, other threads:[~2005-06-02 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-30 20:06 \definetyping[C][option=commands] and the tabulator Peter Münster
2005-05-31 16:13 ` Hans Hagen
2005-06-02 16:12   ` Peter Münster
2005-06-02 20:36     ` 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).