ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: linenumbers in marking
Date: Mon, 8 May 2017 08:36:37 +0200	[thread overview]
Message-ID: <591011F5.1030301@uni-bonn.de> (raw)

Hi all,

5 years ago, on the mailing list, there was a thread started by Pablo 
Rodríguez (http://www.mail-archive.com/ntg-context@ntg.nl/msg62140.html) 
about line numbers in headers. Wolfgang Schuster replied that in 
principle, it's possible to have line numbers in headers, "but it’s not 
usable because the numbers are always shown on the next page." He made 
the following example (which I have slightly adapted):

\definemarking[linenumber]

\define\LinenumberCommand
   {\normalexpanded{\setmarking[linenumber]{\linenumber}}}

\setuplinenumbering[command=\LinenumberCommand]

\startsetups linenumber

         \doiftext {
                 \getmarking[linenumber]
         }
         {
                 \getmarking[linenumber][top] – 
\getmarking[linenumber][bottom]
         }

\stopsetups

\setupheadertexts[\texsetup{linenumber}]

\starttext

\dorecurse{6}{\input tufte\par}

\startlinenumbering
\dorecurse{20}{\input knuth\par}
\stoplinenumbering

\resetmarking[linenumber]

\dorecurse{6}{\input tufte\par}

\stoptext

Hans wrote: "currently it's not possible but it's no big deal to add 
that feature at some point." I have now a similar problem with markings 
in a header. Is there a solution to this? Could it be implemented now?

Thanks, and best wishes

Thomas
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

                 reply	other threads:[~2017-05-08  6:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=591011F5.1030301@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).