\definetyping[C][option=commands] and the tabulator
Hello,
here is a typing-problem:
\definetyping[C][option=commands]
\starttext
With option=commands the tabulator is reduced to one space:
\startC
#include
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
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 -----------------------------------------------------------------
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/
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Peter Münster