ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* line numbering interupted
@ 2002-06-04  8:21 Matthew Huggett
  2002-06-05 19:30 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Huggett @ 2002-06-04  8:21 UTC (permalink / raw)


Hi:

I have a document with line-numbering.  When I use one of my own commands---
for example, \Red{Some Words in Red}--- the line-numbering stops working.
The line-numbering works fine without these homemade commands.  Any ideas as
to why this might be?

Best wishes,

Matthew Huggett


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

* Re: line numbering interupted
  2002-06-04  8:21 line numbering interupted Matthew Huggett
@ 2002-06-05 19:30 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2002-06-05 19:30 UTC (permalink / raw)
  Cc: ntg-context

At 05:21 PM 6/4/2002 +0900, Matthew Huggett wrote:
>Hi:
>
>I have a document with line-numbering.  When I use one of my own commands---
>for example, \Red{Some Words in Red}--- the line-numbering stops working.
>The line-numbering works fine without these homemade commands.  Any ideas as
>to why this might be?

This is a limitation of tex: one cannot disassemble boxes with marks (which 
we used to keep track of colors.

So, the solution is: \setupcolors[state=local] which is ok as long as color 
does not cross pages.

A better way is (in cont-new.tex):

\newevery \everyshapebox \relax

\def\beginofshapebox%
   {\setbox\oldshapebox\normalvbox
      \bgroup
      \reshapingboxtrue
      \the\everyshapebox
      \normalhbox to \shapesignal{\strut\hss}%
      \prevdepth\dp\strutbox}

\appendtoks \localcolortrue \to \everyshapebox

Now, the latest version has a problem with spacing (introduced when 
extending the number placement), in cont-new there should be (only in 
latest version!):

\def\dodoschrijfregelnummer%
   {% beware of em's, the font is already switched !
    \setbox\scratchbox\hbox
      {\setbox0\hbox{\@@rncommando{\regelweergave}}\vsmashbox0%
       \ifcase\linenumberlocation
         \rlap{\hbox to \@@rnbreedte{\box0\hss}}% was \llap, nog testen !!
       \or
        %\llap{\hbox to \@@rnbreedte{\hss\box0\hskip\linkermargeafstand}}%
         \inleftmargin
           {\forgetall
            \doifelse\@@rnbreedte\v!marge
              {\hsize\linkermargebreedte}{\hsize\@@rnbreedte}%
            \alignedline\@@rnuitlijnen\v!rechts{\box0\hskip\@@rnafstand}}%
       \else
         \inrightmargin
           {\forgetall
            \doifelse\@@rnbreedte\v!marge
              {\hsize\rechtermargebreedte}{\hsize\@@rnbreedte}%
            \alignedline\@@rnuitlijnen\v!links{\hskip\@@rnafstand\box0}}%
       \fi}%
    \vsmashbox\scratchbox
    \box\scratchbox}

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


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

end of thread, other threads:[~2002-06-05 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-04  8:21 line numbering interupted Matthew Huggett
2002-06-05 19:30 ` 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).