* question about linenotes
@ 2006-11-05 12:33 Thomas A. Schmitz
2006-11-05 17:35 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Thomas A. Schmitz @ 2006-11-05 12:33 UTC (permalink / raw)
I'm playing with (and happy about) linenotes; I'm just running into
one small (?) problem. Here's a testfile:
\starttext
% \setuplinenumbering[location=intext,step=2]
\startlinenumbering
Long and boring text that has \linenote{note one} no other sense than
demonstrating a problem with the linenote command in ConTeXt.
\stoplinenumbering
\stoptext
Run it, then comment out the \setuplinenumbering command. Is there a
way of having linenotes displayed correctly even when the numbers are
not displayed because of the step= setting?
Thanks
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about linenotes
2006-11-05 12:33 question about linenotes Thomas A. Schmitz
@ 2006-11-05 17:35 ` Hans Hagen
2006-11-05 21:20 ` Thomas A. Schmitz
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2006-11-05 17:35 UTC (permalink / raw)
Thomas A. Schmitz wrote:
> I'm playing with (and happy about) linenotes; I'm just running into
> one small (?) problem. Here's a testfile:
>
>
> \starttext
>
> % \setuplinenumbering[location=intext,step=2]
>
> \startlinenumbering
> Long and boring text that has \linenote{note one} no other sense than
> demonstrating a problem with the linenote command in ConTeXt.
> \stoplinenumbering
>
> \stoptext
>
> Run it, then comment out the \setuplinenumbering command. Is there a
> way of having linenotes displayed correctly even when the numbers are
> not displayed because of the step= setting?
>
\unprotect
\def\donoplacelinenumber
{\the\everylinenumber}
\def\doplacelinenumber
{\ifnum\linenumber<\@@rnstart\relax
\donoplacelinenumber
\else
\ifnum\numexpr(\linenumber/\@@rnstep)*\@@rnstep\relax=\linenumber
\doattributes\??rn\c!style\c!color\dodoplacelinenumber
\else
\donoplacelinenumber
\fi
\fi}
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about linenotes
2006-11-05 17:35 ` Hans Hagen
@ 2006-11-05 21:20 ` Thomas A. Schmitz
0 siblings, 0 replies; 3+ messages in thread
From: Thomas A. Schmitz @ 2006-11-05 21:20 UTC (permalink / raw)
On Nov 5, 2006, at 6:35 PM, Hans Hagen wrote:
> \unprotect
>
> \def\donoplacelinenumber
> {\the\everylinenumber}
>
> \def\doplacelinenumber
> {\ifnum\linenumber<\@@rnstart\relax
> \donoplacelinenumber
> \else
> \ifnum\numexpr(\linenumber/\@@rnstep)*\@@rnstep\relax=\linenumber
> \doattributes\??rn\c!style\c!color\dodoplacelinenumber
> \else
> \donoplacelinenumber
> \fi
> \fi}
Wonderful, that works! Thanks a lot!
Best
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-05 21:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-05 12:33 question about linenotes Thomas A. Schmitz
2006-11-05 17:35 ` Hans Hagen
2006-11-05 21:20 ` Thomas A. Schmitz
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).