# [NTG-context] Critical editions with ConTeXt

talazem at fastmail.fm talazem at fastmail.fm
Wed Jul 22 23:33:18 CEST 2015

Dear Pablo,

Thank you very much for what you proposed — it did work indeed. I tried to achieve the same at some length this afternoon. I think I understand what is going on in the first macro, but wouldn’t have been able to arrive at the  the second one for \variant, or the counter (and still don’t fully understand it). Thanks again.

Hans, Idris, Thomas, and others interested in critical editions: I wonder whether this code — with the user-facing command \variant{#1}{#2} — might be something that could become part of an eventual CritTeXt package.

With many thanks and all best wishes,
Talal

p.s. I had thought it better to add this on to the old thread, since the topic was contiguous. Admittedly, I’m not sure what the proper etiquette for such matters is.

> On 22 Jul 2015, at 21:19, Pablo Rodriguez <oinos at gmx.es> wrote:
>
> 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
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at 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
> ___________________________________________________________________________________