[NTG-context] Line Numbering (blank lines)

Wolfgang Schuster schuster.wolfgang at googlemail.com
Fri Jun 18 18:46:36 CEST 2010


Am 18.06.10 17:55, schrieb David Abdurachmanov:
> Hi,
>
> How make ConTeXt to number blank lines? Blank lines by default are
> skipped. Especially when giving programming examples (source code) in
> ConTeXt documents, I would prefer blank lines still have number.


For mkiv it's works out of the box, for mkii it's not possible to change 
this with a simple key.

Here is a working solution but it redefined a *internal* macro:

% \def\doemptyverbatimline
%   {\vskip\verbatimbaselineskip
%    {\setbox0\hbox{\the\everyline}}%
%    \global\linepartrue}

\def\doemptyverbatimline
   {\dontleavehmode
    \strut
    \the\everyline
    \par}

\starttext
\setuptyping[numbering=line]
\starttyping
one
two

four
five
\stoptyping
\stoptext

Wolfgang


More information about the ntg-context mailing list