From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: is it possible to have first and last line numbers from page?
Date: Sun, 4 Mar 2012 12:04:22 +0100 [thread overview]
Message-ID: <7EE03A1D-A4BA-4AB1-BD98-7075F300C85D@googlemail.com> (raw)
In-Reply-To: <4F534200.3040003@web.de>
Am 04.03.2012 um 11:20 schrieb Pablo Rodríguez:
> I have asked this question before (more than twice), after I found no
> answer in the ConTeXt reference manual, the wiki or the mailing list.
>
> I wanted to be able to have in the headers the first and last line
> number from page. This feature is extremely useful when typesetting some
> kinds of poetry.
>
> The most basic sample would be:
>
> \starttext
> \startlinenumbering
> \dorecurse{10}{\input zapf\par\input knuth}
> \stoplinenumbering
> \stoptext
>
> Is that possible to achieve with ConTeXt?
Yes but it’s not usable because the numbers are always shown on the next page.
\definemarking[linenumber]
\define\LinenumberCommand
{\normalexpanded{\setmarking[linenumber]{\linenumber}}}
\setuplinenumbering[command=\LinenumberCommand]
\startsetups linenumber
\doiftext {
\getmarking[linenumber]
}
{
\getmarking[linenumber][first] – \getmarking[linenumber][last]
}
\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
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2012-03-04 11:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 10:20 Pablo Rodríguez
2012-03-04 11:04 ` Wolfgang Schuster [this message]
2012-03-04 12:15 ` Pablo Rodríguez
2012-03-04 13:44 ` Wolfgang Schuster
2012-03-04 17:36 ` Pablo Rodríguez
2012-03-05 14:12 ` luigi scarso
2012-03-06 17:01 ` Pablo Rodríguez
2012-03-06 17:33 ` Pablo Rodríguez
2012-03-06 18:48 ` luigi scarso
2012-03-06 19:16 ` Pablo Rodríguez
2012-03-06 19:27 ` luigi scarso
2012-03-06 19:42 ` Pablo Rodríguez
2012-03-18 17:12 ` Pablo Rodríguez
2012-03-18 21:33 ` luigi scarso
2012-03-05 10:39 ` Hans Hagen
2012-03-06 17:04 ` Pablo Rodríguez
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=7EE03A1D-A4BA-4AB1-BD98-7075F300C85D@googlemail.com \
--to=schuster.wolfgang@googlemail.com \
--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).