[NTG-context] Bugs in linenumbering ?

Hans Hagen pragma at wxs.nl
Thu Apr 3 16:19:18 CEST 2014


On 4/2/2014 3:17 PM, Stéphane Goujet wrote:
> Hello,
>
>
>    Here is an example that highlights a few problems I have with
> linenumbering.
>
>    When the line numbers are located in the margin, everything is fine.
>
>    But when the number is located in the text:
> 1) Text overflows in the right margin.
> 2) Paragraph indenting does not work. We can even see a kind of right
> indentation appear.
>
> 1+2 => First line of the paragraph is too short, netx ones are too long.
>
> 3) linenumbering does not work within footnotes (neither with line
> numbers in margin nor in text).
>
>
>    Perhaps (3) is not implemented, but I suppose (1) and (2) are not
> the expected behaviour.
>
>
> ==============================
>
> \setuppapersize[A4]
> \setupindenting[yes,first,medium]
>
> \definelinenumbering[lnbasic]
> \definelinenumbering[lntext]
> \definelinenumbering[lntextandnullwidth]
> \definelinenumbering[lntextandwidth]
>
> \setuplinenumbering[lnbasic][]
> \setuplinenumbering[lntext][location=text]
> \setuplinenumbering[lntextandnullwidth][location=text,width=0pt]
> \setuplinenumbering[lntextandwidth][location=text,width=.75em]
>
> \starttext
>
> {\bf A normal paragraph for reference}. \input tufte
>
> \startlinenumbering[lnbasic]
> {\bf Numbers in margin : correct right margin, paragraph indentation.}
> \input tufte \stoplinenumbering
>
> \startlinenumbering[lntext]
> {\bf Numbers in text, default width : overflow, no indentation of the
> first line but some kind of right indentation!} \input tufte
> \stoplinenumbering
>
> \startlinenumbering[lntextandnullwidth]
> {\bf Numbers in text, 0 width : no overflow but overtype on numbers,
> same problem with indentation.} \input tufte
> \stoplinenumbering
>
> \startlinenumbering[lntextandwidth]
> {\bf Numbers in text, average width : average overflow, same problem
> with indentation.} \input tufte
> \stoplinenumbering
>
> It also affects the previous lines when {em line numbering} starts from
> the middle of the line and not on a new paragraph.
> \startlinenumbering[lntext]
> {\bf Numbers in text, default width : overflow, no indentation of the
> first line but some kind of right indentation!} \input tufte
> \stoplinenumbering
>
> Line numbering does not work in footnotes\footnote{
> \startlinenumbering[lnbasic]
> {\bf Numbers in margins.} \input tufte
> \stoplinenumbering
> }
> \footnote{
> \startlinenumbering[lntext]
> {\bf Numbers in text.} \input tufte
> \stoplinenumbering
> }.
>
> \stoptext

you probably didn't test with the beta because most looks ok

i've added support for notes (somewhat tricky)

\starttext

Here we have a footnote \footnote{%
     \startlinenumbering
         \input tufte
         \par % somehow needed
     \stoplinenumbering
}

\stoptext

with respect to text: you need to go narrower or set the distance to 
(e.g.) -1cm


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list