\starttext

\setuppapersize[S6][S6]
\setuplayout[width=middle,height=middle,margin=1.5cm,footer=0pt,header=1cm]

\setupcolors[state=start] \setuptyping[option=color]

\definelinenote[extralinenote][rule=on,rulecolor=darkgreen,frame=on,
framecolor=darkgreen]
\setuplinenote [linenote] [rule=on,rulecolor=darkred,frame=on,
framecolor=darkred]

\showframe

\title{Feature requests}

\subject{Issues:}

\startitemize
\item  I could not find any option for paragraphed notes, eg p. 398 of the
\TeX{}Book. columned support seems broken, but that is discussed in
\type{testlinenotes-003}.  {\bf high}

\item Is the first argument \type{[<reference>]} for
\type{\start-\stoplinenote} mandatory? For lots and lots of notes it can be
unwieldy.  {\bf medium}

Or can we automate the references somehow?
\item Can we control the formtting of the note separator line? Choose another
seperator altogether, like a figure?  {\bf high}

\item Lemmas: ({\bf high})

\starttyping
\item \setuplinenote[lemmasep={]}]

\startlinenote [one][A linenote\textellipsis 3--5] {The lemma is followed by the actual note.}
A linenote environment has a line range. That is, if the environment is, eg,
3 lines long, then we'll get a number range in the margin such as 3--5.
\stoplinenote [one]
\stoptyping

Then the note will give us, say

\blank

3--5 A linenote... 3--5] The lemma is followed by the actual note.

\blank

We could also try to automate the lemma: Take the first and last words of
the note environment, separate them with a \type{textellipsis}, and add
the separator. We could add a configuration option in case words are too short,
eg, \quotation{A book is a wonderful companion when lonely} could become
\quotation{A book\textellipsis lonely}.

\starttyping
\setuplinenote[lemma=(1,1),lemmamiddle=\textellipsis,lemmasep={]}]

\startlinenote [one][lemma=(2,1)]{The lemma is followed by the actual note.}
{A book is a wonderful companion when lonely}
\stoplinenote [one]
\stoptyping

will give

\blank

3--5 A book... lonely] The lemma is followed by the actual note.

\blank

so the lemma will always take the first and last words of the argument to the
environment unless one explicitly changes it in the environment itself.

\item Instead of linenote numeral ranges hanging in the margin, can we
bring them into the textblock? paragraphed notes would need this any way....  {\bf high}

\item Needed: to be able to change the size or style of the linenote
numerals without changing the style of the note text. See also
\type{testlinenote-004}.  {\bf high}

\item 2. A bug: \type{\lefttoright} and \type{\righttoleft} interfere with
\type{\startlinenumbering} if either occurs inside the buffer or
immediately before --ie no space -- \type{\startbuffer}.   {\bf medium}
% \item
% \item
\stopitemize
\page

\startbuffer[test]
\setuplinenumbering[start=1,step=5,method=first]
\startlinenumbering
test \linenote {A simple linenote does not have a line range}
test test test test test test test
\startlinenote [one] {A linenote environment has a line range}
\dorecurse{40}{test }.
\stoplinenote [one]
test test test test test test
\startextralinenote[extraone]{This works!}
\dorecurse{40}{test }.
\stopextralinenote[extraone]
\startlinenote [two] {A linenote environment has a line range}
\dorecurse{40}{test }.
\stoplinenote [two]
test test test test test test
\startextralinenote[extratwo]{This works!}
\dorecurse{40}{test }.
\stopextralinenote[extratwo]
\par
\stoplinenumbering
\stopbuffer

{{\lefttoright \typebuffer[test]} \page \getbuffer[test] \page}

\stoptext
