ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Bugs in linenumbering ?
Date: Thu, 03 Apr 2014 16:19:18 +0200	[thread overview]
Message-ID: <533D6DE6.3030007@wxs.nl> (raw)
In-Reply-To: <20140402131706.1fd47e20@cuisine.seix>

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2014-04-03 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 13:17 Stéphane Goujet
2014-04-03 14:19 ` Hans Hagen [this message]
2014-04-03 15:08   ` Pablo Rodriguez
2014-04-03 17:16   ` Stéphane Goujet
2014-04-03 17:01     ` Rik Kabel
2014-04-03 22:15       ` Stéphane Goujet
2014-04-04  0:15       ` Stéphane Goujet
2014-04-04  3:02         ` Rik Kabel
2014-04-05 14:05           ` Stéphane Goujet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=533D6DE6.3030007@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).