# [NTG-context] Critical editions with ConTeXt

Pablo Rodriguez oinos at gmx.es
Wed Jul 22 22:19:34 CEST 2015

On 07/22/2015 09:26 PM, Talal wrote:
> [...]
> I would like to be able to automate (through macros) the making of a
> critical apparatus' note. This is for two reasons. First, the body text
> and the lemma in the note below should be identical: as such, they
> ideally not have to be typed twice, as it introduces the possibility of
> error. Furthermore, if one manually writes out \linenote{Lemma ]
> Comment} in the body of the text, you forego the separation of content
> and style, since the separator ] has been hardcoded in.

Hi Talal,

I wonder whether creating a new thread should be the right thing to do.
The original thread is three years old.

\unexpanded\def\doVariant#1#2#3%
{\startlinenote[#1]{#2] #3}#2\stoplinenote[#1]}

\newcounter\countvariants
\unexpanded\def\variant
{\doglobal\increment\countvariants
\normalexpanded{\doVariant{Varia:\countvariants}}}

\starttext

\startlinenumbering

\dorecurse{20}{\variant{donald e knuth}{herman zapf} }

\stoplinenumbering

\stoptext

BTW, it has a “minor issue”: hyphenation doesn’t work in the body text
It works fine in the notes. I reported this, but I’m afraid it hasn’t
been solved.

Just in case it helps,

Pablo
--
http://www.ousia.tk