summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ednotes/ednotes.sty
blob: 9168f7c0f53f5b2e90b4aed66ea679a2cf3bf259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
%% Macro package `ednotes.sty' for LaTeX2e, 
%% copyright (C) 2002--2005 Uwe L\"uck & Christian Tapp (direction) 
%%               2006       Uwe L\"uck 
%% http://www.contact-ednotes.sty.de.vu 
%% --author-maintained, for critical editions
%% (varying J. Lavagnino's and D. Wujastyk's EDMAC). 
%% 
\def\fileversion{1.3a} \def\filedate{2006/10/05} %% TODO 
% 
%% This file can be redistributed and/or modified under 
%% the terms of the LaTeX Project Public License; either 
%% version 1.3c of the License, or any later version.
%% The latest version of this license is in
%%
%%     http://www.latex-project.org/lppl.txt
%%
%% We did our best to help you, but there is NO WARRANTY. 
%%
%% Please report bugs, problems, and suggestions via 
%% 
%%   http://www.contact-ednotes.sty.de.vu 
% 
%% * USAGE: *
% 
% *Overview:* 
% This package provides facilities for notes in (critical) editions. 
% `\Anote{LEMMA}{NOTE}' prints NOTE in an extra footnote apparatus, 
% referring to LEMMA by its line numbers (as generated by 
% `lineno.sty') and by repeating LEMMA in the note. By calling the 
% package with extra options, you can add \Bnote etc. and choose 
% whether notes of one apparatus appear in a single paragraph on 
% each page or in separate paragraphs (`manyfoot.sty'). 
% In LEMMA, `...\<...\>...' indicates what short version of it is to 
% appear in the note. There are further facilities to customize 
% appearance of notes. 
% Commands \Anotelabel{LABEL}, \donote{LABEL}{NOTE} etc. vary \Anote 
% etc. in admitting overlapping lemmas. 
% ---The package is made for those who need something like EDMAC 
% but who want to employ LaTeX2e at the same time. 
% More detailed description below is divided into 
% `packages required', `user commands', `package options', 
% `customizing', `Note on EDMAC', and `Comparison with LEDMAC'. 
% 
% *Note on "rival" package LEDMAC:* Peter R. Wilson has made a 
% LaTeX package LEDMAC (available on CTAN) for about the same 
% purpose as the present package. See `Note on EDMAC' and 
% `Comparison with LEDMAC' below. 
% 
% *Printed presentation:* An article on `ednotes' with user 
% instructions, examples, and comparisons with `[L]EDMAC' 
% appeared in the TUGboat volume for 2003. A version of it is 
% obtainable from the `ednotes' CTAN folder (`ednotugb.pdf'). 
% 
% *Packages required:* 
% This package will not work without the following ones 
% ("visible"--cf. visible.txt in CTAN ednotes folder): 
% o  Packages `manyfoot.sty' (v1.9+) and `nccfoots.sty' by 
%    Alexander I. Rozhenko from the `ncctools' bundle. 
%    You needn't know anything about these 
%    except perhaps options `para' and `para*' 
%    choosing footnote indentation (see `package options' below). 
% o  Package `lineno.sty' by Stephan I. B"ottcher. 
%    We here suppose that you know and employ some of the 
%    line numbering commands from `lineno.sty'. 
% However, please don't load these packages on your own. 
% Instead of calling them with some options, put these options 
% into the brackets of \usepackage[<options>]{ednotes}. 
% 
% *Availability:* 
% o  In case you have not received `manyfoot.sty' and `nccfoots.sty', 
%    you find them in the CTAN folder 
%      `macros/latex/contrib/ncctools/unpacked' . 
%    You find PDF documentations in 
%      `macros/latex/contrib/ncctools/doc' . 
% o  `lineno.sty' is in CTAN folder `macros/latex/contrib/lineno'. 
%    In the same folder, there is `lineno.pdf' for documentation. 
% 
% *Optional packages:* 
% o  Some package options may need additional package files (for 
%    a while). They may be in the `ednotes' or `lineno' CTAN folder.
%    The README files there will name them or tell where they are 
%    named.                                                            %% TODO
% 
% *Other useful files:* 
% Look at the README file in CTAN folder 
% `macros/latex/contrib/ednotes' for quick information on what other 
% files in the folder provide.                                %% TODO: indeed? 
% 
% *User commands:* 
% *Basic:* --------------------------------------------------------
% \Anote{LEMMA}{NOTE} prints LEMMA where it occurs 
% and sends NOTE into an extra footnote apparatus. 
% The lines where the command occurs must be numbered 
% by using commands from package `lineno.sty'. 
% In the footnote, NOTE is preceded by line numbers of LEMMA, 
% by a version of LEMMA (see below), and by some separating stuff. 
% Separating stuff by default is a properly spaced right bracket 
% according to \lemmafmt (see below). 
% \Anote may be nested in LEMMA. 
% (Overlapping lemmas may be generated by \Anotelabel etc. as 
% described below.)
% For customizing appearance of notes, see `package options' and 
% `customizing' (\lemmafmt and \lemmaellipsis, e.g.) below. 
% For additional analogous commands \Bnote etc., see 
% `"optional" user commands' below. 
% *Short lemma substitute in note:* -------------------------------
% (The following describes a comfortable extension of 
% EDMAC's \lemma.)
% LEMMA argument of \Anote as above may appear as `L1\<L2\>L3', then 
% only L1 and L3 appear in the footnote with some ellipsis symbols 
% between them. By default, these are \textsymmdots according to 
% \lemmaellipsis. 
% (For \textsymmdots vs. ordinary \dots see `miscellaneous' below.) 
% L2, however, may start with `<ELL>', then ELL is used instead of 
% \textsymmdots or whatever else \lemmaellipsis might call. 
% (To be sure, symbols `\<', `<', `>', `\>' work in a special way 
% in LEMMA. `>' might be used inside ELL if inside braces, e.g., 
% `\<<{$>$}>'. <ELL> works as an optional argument of \< like 
% brackets usually do in LaTeX---we thought you might use `[' here 
% as a symbol to be printed in main text. Care for proper spacing in 
% both versions of the lemma by spaces touching \<, \>, and braces. 
% ---A special version of the package would be necessary for those 
% having no `<', `>' on their keyboards.) 
% *Overlapping lemmas:* -------------------------------------------
% \Anotelabel{LABEL}LEMMA\donote{LABEL}{NOTE} 
% works just like \Anote{LEMMA}{NOTE} above. However, by using 
% proper LABELs, you can indicate which of overlapping lemmas 
% begins and ends where. Note that the second command is only 
% \donote, not \Adonote. In LEMMA, \pause{LABEL} and \resume{LABEL} 
% act analogously to \< and \> above for lemma substitutes, and 
% \pause{LABEL}<ELL> employs your own ELL for the ellipsis. 
% LEMMA may contain \Anote and the other way round (in some way). 
% However, \pause{LABEL} must not be hidden in braces etc. 
% *Commands in lemma as repeated in a note:* ----------------------
% Some commands should work in main text, but not in the lemma 
% text of the note, e.g. \label. With respect to some of them, 
% `ednotes.sty' makes an adjustment for this. Nesting of lemmas, 
% e.g., is enabled this way. 
% For other commands, you can hide code from a note 
% by \notinnote, e.g.: \notinnote{\footnote{...}}. 
% If you know about relevant (La)TeX internals, you can define 
% behaviour of commands in lemmas using \addlemmaexpands, e.g. 
% \addlemmaexpands{\let\footnote\@gobble}. 
% (However, the latter code is bad if \footnote should occur 
% with an optional argument. Moreover, in some cases 
% \let...\notinnote may handle spaces better than 
% \let...\@gobble, since \notinnote uses a variant of LaTeX's 
% \@bsphack and \@esphack. 
% ---\addlemmaexpands has only local effect inside group.) 
% \showlemmaexpands displays all these extra definitions 
% which would apply in the lemma ahead. 
% (A lot of commands might be changed here, we chose only few. 
% Cf. EDMAC's \no@expands; EDMAC, however, deals with the 
% problem in a different way and needs more changes 
% than we do.)
% ---You may find 
%   \IfLemmaTag{<in lemma tag>}{<in main text>}
% useful as well, perhaps more flexible than \notinnote. 
% 
% *"Optional" user commands:* -------------------------------------
% Each of \Bnote, \Bnotelabel, \Cnote, \Cnotelabel, \Dnote, 
% \Dnotelabel, \Enote, and \Enotelabel is defined by calling 
% respective package options `Bpara' or `Bplain' etc., see 
% `package options' below. They work like \Anote and \Anotelabel, 
% respectively, and nesting and overlapping of their lemmas works 
% as for \Anote and \Anotelabel. \donote works with each of 
% \Anotelabel, \Bnotelabel etc.---care for different labels. 
% \nopunct may help you in case of certain changes of \notefmt, see 
% `customizing' below (not active outside notes). 
% *Miscellaneous:* ------------------------------------------------
% As a byproduct, we provide \textsymmdots as an alternative to 
% \dots or (more specific) to LaTeX2e's \textellipsis. We feel that, 
% in the middle of the short version of a lemma, the text dropped 
% should be replaced by symmetrically spaced dots, i.e., in 
% L1 ... L3, the space between L1 and the dots should be the same 
% as the space between the dots and L3. \textellipsis obstructs this 
% by calling a space after the final dot which is not balanced by a 
% space before the first dot. \textsymmdots just closes without that 
% final space---that's all the difference to \textellipsis. (Cf. 
% TeXbook p. 73 where $\ldots$ is recommended for the same purpose.) 
% Of course, it is now your job to care for proper spacing on left 
% and right, e.g., use it this \textsymmdots\ way. 
% Note that with a comma following \dots is quite right while 
% `\textsymmdots,' is bad. %% TODO: delimiters!? e.g. [...] 
% -- Now (since Sep 2004) indeed there is the `ellipsis' package 
% by Peter J. Heslin on CTAN in the /macros/latex/contrib directory! 
% It deals with this problem much more thoroughly. 
% *Wrong placement:* ----------------------------------------------
% We do not provide helpful error messages for badly placed \<, 
% \pause, and the like in this version. You will just get 
% `undefined' errors, complaints about \mskip, or `runaway 
% argument' errors.---Doubling labels with \Anotelabel etc. may 
% work well if you know what you are doing. 
% 
% *Package options:* 
% 1.) Options `left', `right', `switch', `switch*', `columnwise', 
% `pagewise', `running', `modulo', `mathlines', `displaymath', 
% `edtable' (edit tabular environments), `longtable' (edit 
% `longtable' environments), `nolongtablepatch' are passed to 
% package `lineno'; cf. the latter package for information 
% (not yet tested all).                                                %% TODO 
% `left' and `running' act by default. 
% Option `mathnotes' calls `lineno.sty' package option `mathrefs', 
% see `lineno' documentation as well. 
% 2.) Option `Aplain' arranges all notes for one page generated 
% by \Anote and \Anotelabel in a single footnote paragraph. 
% Option `Bplain' generates an apparatus using one footnote 
% paragraph for each note, with commands \Bnote, and \Bnotelabel. 
% Option `Bpara' does the same but arranging all notes 
% for one page in a single footnote paragraph. 
% Analogues apply to `Cplain', `Cpara', `Dplain', `Dpara', 
% `Eplain', and `Epara'. (There is `Apara' as well---default.)
% Option `para*' suppresses indentation of footnote paragraphs 
% coming from options like `Apara' (cf. package `manyfoot'). 
%% TODO: para indent correct? 
% 3.) Option `edmacpara' makes up for problems with `para' 
% footnotes that are discussed in `EDMAC.doc' section 
% `Paragraphed footnotes'. See our package `mfparptc.sty' for 
% details (for the time being). 
% 4.) Option `perpage' is just passed to `manyfoot.sty'.
% (This requires that the perpage package has been installed; 
% to be obtained from CTAN folder macros/latex/contrib/bigfoot/.) 
% 5.) Option `countoccurrences' provides a command \countword 
% for a half-way solution of the problem of lemma words that 
% occur more than once in a line. See our package `edcntwd0.sty'. 
% (With `ednotes.sty' v1.1 you need `edcntwd0.sty' v0.31.) 
% 
% *Customizing:* 
% Appearance of notes is directed by macros \extrafootnoterule, 
% \linesfmt etc. occurring in the following lines 
% (each starting with \renewcommand). -- More recently, customizing 
% footnote rules has been introduced; see below. 
% For customizing, copy the respective lines to your own file, 
% remove left hand comment mark, and change the definition in the 
% right hand pair of braces. (The definition you find there is our 
% original one; we hope you understand from these definitions how 
% they work in general and what the arguments are. E.g., \linesfmt 
% applies to printing of line numbers and, originally, renders them 
% bold-faced, followed by \enspace. Note that this default suppresses 
% hyphenation of the first word of a lemma tag.) 
% This controls identical behaviour in *every apparatus*. 
% For changing appearance of a single apparatus without changing 
% the remaining, see below.---Note: With v1.1, \ref has been 
% removed from the definition of \repeatref, and a \ref in any 
% customization of it will not work any longer. As well, earlier 
% \linewithpage used \ref and \pageref, and this will not work any 
% longer. \linewithpage has been replaced by \pageandline. 
% \renewcommand{\extrafootnoterule}{\footnoterule} 
% ---This is a `manyfoot.sty' command for separating each extra 
% apparatus from the other ones.--- 
% \renewcommand*{\sameline}[1]{\linesfmt{#1}} 
% \renewcommand*{\differentlines}[2]{\linesfmt{#1--#2}} 
% %% TODO: \linesfmt into \@EN@note!? 
% \renewcommand*{\linesfmt}[1]{\textbf{#1}\enspace} 
% ---E.g., for enabling hyphenation of first word of lemma tag: 
% % \renewcommand*{\linesfmt}[1]{\textbf{#1}\enspace
% %                              \hspace*{0pt}}
% ---Last line works like german.sty's \allowhyphens. 
% \renewcommand*{\pageandline}[2]{#1.#2} % #1 page, #2 line. 
% \renewcommand{\lemmafmt}[1]{#1\thinspace]\enskip} 
% \renewcommand*{\repeatref}[1]{#1} 
% ---E.g., for replacing repeated line numbers by non-bold slash: 
% % \renewcommand*{\repeatref}[1]{\textnormal{/}} 
% \renewcommand{\lemmaellipsis}{\textsymmdots}
% \renewcommand{\notefmt}[1]{#1} 
% Note: \notefmt, originally, takes your note just as it is. 
% By redefinition 
%     \renewcommand*{\notefmt}[1]{#1.} 
% you might add an automatic closing full stop to each note. 
% In a single note of the same apparatus, however, you might then 
% want to close by a question mark (e.g.) instead of the fullstop. 
% For this purpose, close that note by `?\nopunct'. \nopunct then 
% gobbles the full stop waiting ahead. (So much as to \notefmt.)
% ---Customizing a *single apparatus*: 
% For changing appearance of the apparatus feeded by \Anote 
% without changing remaining apparatuses (feeded by \Bnote etc.), 
% take the following lines (the one with a single right brace 
% being the last one) to your own file and remove the left hand 
% column of comment marks. Remove then left hand comment marks 
% of single lines containing commands whose behaviour in the 
% apparatus you want to change. Change their definitions in 
% right hand braces. (It is quite important never to remove 
% right hand comment marks, as you may know!)
% \newcommand{\Anotefmt}{% 
% % \renewcommand*{\sameline}[1]{\linesfmt{##1}}% 
% % \renewcommand*{\differentlines}[2]{\linesfmt{##1\textendash##2}}% 
% % \renewcommand*{\linesfmt}[1]{\textbf{##1}\enspace}% 
% % \renewcommand*{\pageandline}[2]{##1.##2}% ##1 page, ##2 line. 
% % \renewcommand*{\repeatref}[1]{##1}% E.g., ... 
% % % \renewcommand*{\repeatref}[1]{\textnormal{/}}% ... instead. 
% % \renewcommand{\lemmafmt}[1]{##1\thinspace]\enskip}% 
% % \renewcommand{\lemmaellipsis}{\textsymmdots}% 
% % \renewcommand{\notefmt}[1]{##1}% 
% } 
% For changing the \Bnote apparatus, do the same and change 
% \Anotefmt into \Bnotefmt. Analogues apply to \Cnote etc. 
% ---You can, moreover, add code in the definition of \Anotefmt etc. 
% for additional settings to be active throughout the note 
% (including line numbers and lemma reference), 
% e.g., for selection of a certain font type. 
% ---`manyfoot' v1.9 offers a command \SetFootnoteHook for 
% controlling the appearance of the whole paragraph of an apparatus 
% in `para' or `para*' style---please see the `manyfoot' 
% documentation for examples. `ednotes' v1.2 makes use of this 
% through a new command \PrecedeLevelWith{X}{CODE}. E.g., 
% \PrecedeLevelWith{A}{\textit{Var.:}} and 
% \PrecedeLevelWith{B}{\textit{Sim.:}} (once and for all) 
% may distinguish the variant from the similia apparatus. 
% CODE may also be used to contol the paragraph indent of 
% the apparatus (so the paragraphs may have different 
% indents) or to shape the paragraph more generally 
% (according to TeXbook chapter 14, especially pp. 101f.). 
% To give a general rule, \PrecedeLevelWith{X}{CODE} has 
% the same effect as \SetFootnoteHook{CODE} 
% \DeclareNewFootnote[para]{X} would have with `manyfoot'. 
% Without the `para' option or with the `plain' style of 
% notes, CODE just is executed starting each note (preceding 
% even the line number and the lemma). 
% ---*Special characters:* As is noted in EDMAC's documentation, 
% the en-dash for line number printing or the separating right 
% square bracket might be coded unusually in some special font 
% which has been chosen and so may escape being printed. Should you 
% encounter this problem indeed, you can use the previous for remedy 
% (e.g., change \lemmafmt). (EDMAC's solution is use of 
% \endashchar etc. for taking these characters from the \rm font.) 
% ---You may *redefine* most of the commands provided by the 
% package. *Exceptions* are \donote, \<, and \>. So you might 
% put \newcommand{\variant}{\Anote} or even (for TeXperts) 
% \let\variant\Anote into your file (after `ednotes.sty' has been 
% read). No problem about nesting will arise (as did with EDMAC). 
% EDMAC's suggestion to make <...> a shorthand, however, would 
% conflict with our lemma mechanism. (Coexistence would be possible 
% by suitable use of braces and repeating present definitions 
% after change of <'s catcode.)
% ---Customizing *footnote rules*: From its version 1.5 onwards, 
% manyfoot has offered customizing footnote rules, as described 
% in section 3 of manyfoot.pdf . Only with version 1.3 onwards, 
% our ednotes supports this manyfoot feature. First please note 
% that ednotes always simply executes \newfootnote, never 
% \DeclareNewFootnote. This seems to suffice for scholarly 
% critical editions and for customizing the footnote rules. 
% When you read in manyfoot.pdf about customizing footnote 
% rules, therefore please disregard any difference between 
% \newfootnote and \DeclareNewFootnote.---So please read 
% section 3 of manyfoot.pdf . Observe the \SelectFootnoteRule 
% commands preceding some \DeclareFootnoteRule commands. 
% If such a command precedes \newfootnote{<X>}, ednotes 
% produces the same effect if you precede loading ednotes 
% after \newcommand{\Select<X>noterule}{<SFR args>}, 
% when you would want to use \SelectFootnoteRule<SFR args> 
% with mere manyfoot. (The accompanying file varnrule.tex 
% explains more and enables you to play with the possibilites.) 
% ---(Please never forget to update the ncctools MiKTeX package 
% when you update the ednotes package!)
%
% *Your shorthands:*
% \Anote etc. prevent editorial notes from appearing in the 
% table of contents when such commands (\Anote etc., i.e.) 
% appear in a heading (e.g.). But when you define a shorthand macro 
% (using \newcommand) that has an optional parameter and \Anote 
% or so in the defining code, something more is needed to have 
% the lemma, without the note, in the table of contents (or ...) 
% E.g., you might \newcommand*{\variant}[1][A]{\Anote{#2}{#1}}
% so \variant{res} works like \Anote{res}{A} and \variant[B]{res}
% works like \Anote{res}{B}. ednotes v1.22 offers two solutions 
% to this problem: 
% 1. You can precede your shorthand with \RobustTestOpt whenever it 
%    appears in a "moving" argument like a chapter heading -- 
%    \RobustTestOpt\variant{res}    as well as 
%    \RobustTestOpt\variant[B]{res} , e.g. 
% 2. You can save yourself from caring for \RobustTestOpt by using 
%    \NewEdnotesCommand instead of \newcommand -- 
%    \NewEdnotesCommand*{\variant}[2][A]{\Anote{#2}{#1}}
% These facilities work only when the shorthand has an *optional* 
% parameter and at least one *mandatory* parameter -- well, if it 
% doesn't have, you can use \RobustTestOpt if you put a pair of 
% braces after the shorthand macro name, this would work as well. 
% ---You may find 
%   \IfTypesetting{<for typesetting>}{<for mere expanding>}
% more flexible. 
% 
% *Known problems:* 
% With run-in-paragraph footnotes (options `para' or `para*'), notes 
% may end too deep on the page or (with `longtable.sty') even overlap 
% with main text. `ednotes.sty' shares this "feature" with EDMAC and 
% LEDMAC. Output gets worse as the number of paragraphed-footnote 
% series increases. `manyfoot.sty' version 1.7 (!) accounts for this 
% by a command \ExtraParaSkip (as an interim solution). This command 
% reserves additional vertical space for the notes (so there is less 
% space for main text---at the expense of too large empty space on 
% some pages). After `ednotes.sty' (or `manyfoot.sty') has been 
% loaded (i.e., below \usepackage...), type `\ExtraParaSkip{<skip>}' 
% (still in the preamble) where <skip> may be any glue parameter. 
% <skip> may be a multiple of any absolute space unit (e.g., `4pt' or 
% `2mm'), it may even be a multiple of a space unit depending on the 
% font size of notes (\footnotesize)---like `em', `ex', or 
% `\normalbaselineskip' (e.g., `.5\normalbaselineskip'). (However, 
% stretch and shrink of, e.g., \normalbaselineskip are ignored.) 
% Experiment with choices for <skip> such that notes neither overlap 
% with main text nor hang too deep on the page. The most safe choice 
% is `\ExtraParaSkip{.5\normalbaselineskip}'. 
% ---Manyfoot.sty did something similar before; i.e., it reserved 
% .5\normalbaselineskip (with respect to \footnotesize) for the notes. 
% This may not be needed on some pages (on such pages there may be 
% too much empty vertical space). 
% ---For the best solution you should, when your work is ready and 
% only needs optimization of formatting, type 
% \ExtraParaSkip{-.5\normalbaselineskip} 
% (to remove the space that Manyfoot.sty reserves) and then insert 
% \pagebreak's in your main text to avoid overful pages. 
% ---We formerly offered a command \MFparaxbuffer in file 
% `mfparxsp.sty' instead. This could be used once only in the 
% document preamble. \ExtraParaSkip does not have this limitation. 
% This allows, e.g., first setting a "default" value and changing it 
% under certain conditions, e.g.: 
% \ExtraParaSkip{<skip1>} ... \if... \ExtraParaSkip{<skip2>} ... \fi 
% (Thanks to Florian Kragl who presented a similar first remedy for 
% the problem.) 
% 
% *The problem of oscillating page breaks:* 
% In typesetting critical editions, there is an increased danger 
% of page break oscillations, causing wrong numberings, 
% placements, and cross-references. Our package `lblchng1.sty' 
% (same CTAN directory) offers help with this. However, 
% `ednotes.sty' v1.1 takes over most of the job from 
% `lblchng1.sty'. We still recommend to *read the file* 
% `lblchng1.sty' on how to use the messages from `lblchng1.sty' 
% and `ednotes.sty' on page number changes (be sure that it is 
% v0.32 or higher). The warnings from ednotes.sty may suffice. 
% Just look at the final messages on screen or in .log. 
% -- You can overcome such problems using \pagebreak 
% (Standard LaTeX) or \warningpagebreak (from present package) 
% -- force the earlier page break! 
% \warningpagebreak works like Standard LaTeX \pagebreak, it just 
% adds a reminder for the case that such a manual page break 
% may become bad after revisions of your entire work. 
% 
% *A problem with `hyperref.sty':* 
% To guarantee compatibility with `hyperref', updating lineno.sty 
% to v4.3 is recommended. 
% 
% *Note on EDMAC:* 
% `edmac.doc' is a macro package by John Lavagnino and 
% Dominik Wujastyk made for critical editions to be used in presence 
% of Plain TeX only. We refer to the macros and documentation of 
% this package by `EDMAC'. There is an enhancement `edmacfss.sty' 
% for additionally employing the New Font Selection Scheme (NFSS) 
% from LaTeX2e. With `edmacfss.sty', some LaTeX commands work by 
% accident. However, it replaces LaTeX's \end by PlainTeX's \end, 
% so LaTeX environments don't work. Moreover, 
% EDMAC defines its own output routine in place of LaTeX's, 
% so LaTeX's page assembly and related commands (\marginpar ...) 
% are disabled. EDMAC still provides facilities 
% (columnar footnotes, endnotes, sublines) which are neither 
% implemented here nor in packages `manyfoot' and `lineno' 
% on which the present one is based. However, there are authors 
% who have had a desire to stay in LaTeX's paradise and to enjoy 
%% TODO: Hilbert translation 
% EDMAC features at the same time. (E.g., edition may be only part 
% of your document, or you want to use many LaTeX packages.)
% Fortunately, Christian was led to packages `manyfoot' and `lineno' 
% which implement the most desirable of EDMAC's facilities for use 
% with LaTeX. A version of EDMAC's \text and assembly of notes 
% remained to be done. We even go beyond EDMAC concerning lemma 
% substitutes and overlapping lemmas. 
% ---For explanation of present solutions, we sometimes refer to 
% EDMAC where similar problems are dealt with in similar but 
% sometimes essentially differing ways. Therefore, knowledge of 
% EDMAC may foster your understanding commands and remarks 
% presented here, but it is not required. 
% ---Dominik maintains a homepage for EDMAC and related software: 
% http://www.homepages.ucl.ac.uk/~ucgadkw/edmac/
% 
% *Comparison with LEDMAC:* 
% (Cf. http://ednotes.sty.de.vu and `ednotugb.pdf'.)
% Peter Wilson's LEDMAC ports EDMAC to LaTeX, i.e., you get 
% almost exactly EDMAC *functionality* and same *user interface* 
% as in good old EDMAC (some slight changes of command names 
% were necessary). Thus it offers a very easy switch to LaTeX 
% for EDMAC addicts and is superior in functionality to `ednotes.sty' 
% where EDMAC is (columnar footnotes, endnotes, sublines, etc.? 
% --first two might change over the years). `ednotes.sty' might 
% be favoured if you really need overlapping lemmas, and we tried 
% to offer further user-friendly features as spelled out above. 
% --Some users want to edit tables. For EDMAC there is the 
% TABMAC package providing special commands for this. A TABMAC 
% port is part of LEDMAC. This is nice for EDMAC/TABMAC addicts. 
% Our additional package `edtable.sty' allows for lemmas in (some) 
% LaTeX tabular environments and numbers their rows as if they were 
% lines. This is nice for those who only know the LaTeX tabular 
% environments. However, TABMAC and its mirror in LEDMAC offer 
% facilities which are not provided by LaTeX/ednotes/edtable. 
% --LEDMAC *implementation* is very close to EDMAC's as well, 
% differing very much from `ednotes.sty', especially concerning 
% use of auxiliary files. However, this seems to have no practical 
% effects. On very old machines, EDMAC/LEDMAC might be slower, while 
% Ednotes might cause memory overflow with small TeX versions and 
% many notes. Peter Wilson [3/3 2004] estimates that rather 
% EDMAC's/LEDMAC's typesetting everything twice might be a 
% disadvantage in comparison with `ednotes.sty'. 
% ---In 2004 LEDMAC has been enhanced considerably beyond the 
% functionality of EDMAC and `ednotes.sty'. 
% It now also includes indexing by line as well as by page, 
% a port of Wayne Sullivan's EDSTANZA, new options for line 
% numbering, a minipage-like environment (which may break across 
% pages) such that remarks are printed immediately after some piece 
% of edited text (a letter, e.g.), and "sidenotes". 
% Finally an extension package `ledpar' adds parallel typsetting. 
% --At least for some time LEDMAC will be more user-friendly 
% in providing all functions in a single file with *one* 
% *printable* documentation file.                          %% TODO 
% On the other hand, packages we build on are still being enhanced 
% in functionality by their authors. 
% 
% 
%% Acknowledgements 
% 
% Christian saved me from most of the work by having found 
% packages `lineno.sty' by Stephan I. B"ottcher and `manyfoot.sty' 
% by Alexander I. Rozhenko which do the output stuff. Thanks to 
% Christian, Stephan and Alex! I appreciate their work (especially 
% Stephan's approach to adding and remembering line numbers), and I 
% admire John Lavagnino's and Dominik Wujastyk's work on EDMAC. 
% I am also grateful for their encouragement. U.L. 
% 
% Moreover I am much indebted to Stephan B"ottcher and Alex 
% Rozhenko for their co-operation in reducing the number of 
% package files that `ednotes.sty' needs. (This was 2004, 
% version v1.0.)
% 
% For pointing out errors and problems, we are grateful to test 
% users Robert Alessi, Sergei Mariev---see version history. 
% Florian Kragl contributed to now `manyfoot.sty's \ExtraParaSkip 
% as described above. v1.1 and v1.23c are due to problems that 
% Roy Flechner reported. v1.12 is due to Hillel Chayim Yisraeli's 
% discovery of spurious footnote marks. 
% 
\NeedsTeXFormat{LaTeX2e}[1994/12/01] 
% 1994/12/01: \newcommand* etc.       %% TODO: more recent needed? 
\ProvidesPackage{ednotes}
                [\filedate\space v\fileversion, 
                 for critical editions] 
                 %%%(ul)]%%%by Uwe L\string\"uck.] 
% 
%% Our warnings: 
\def\@EN@warning{\PackageWarning{ednotes}}
% 
%% Package Options:
% 
% Own options
% (must appear before `para*' so this can override `para'): 
%% TODO: true!? 
%% TODO: Something to make use of Alex' \SplitNote!? 
\let\if@EN@Apara\iftrue % Makes option `Apara' default. 
\DeclareOption{Apara}{% Redundant, just in case ... 
  \@EN@warning{Package Option `Apara' is redundant}
%   \PassOptionsToPackage{para}{manyfoot}% 
%   \AtEndOfPackage{% 
%     \newfootnote[para]{A}% 
%     \newcommand{\Anote}{\@EN@note A}% 
%     \newcommand{\Anotelabel}{\@EN@notelabel A}% 
% }} 
} 
\DeclareOption{Aplain}{% 
  \let\if@EN@Apara\iffalse 
%   \AtEndOfPackage{% 
%     \newfootnote{A}% 
%     \newcommand{\Anote}{\@EN@note A}% 
%     \newcommand{\Anotelabel}{\@EN@notelabel A}% 
% }} 
} 
\DeclareOption{Bpara}{% 
  \PassOptionsToPackage{para}{manyfoot}% 
  \AtEndOfPackage{% 
    \SetFootnoteHook{\@EN@MF@hook@B}%
    \let\@EN@MF@hook@B\@empty 
    \@ifundefined{SelectBnoteRule}{}{% 
      \expandafter\SelectFootnoteRule\SelectBnoteRule 
      \let\SelectBnoteRule\relax}% 
    \newfootnote[para]{B}% 
    \newcommand{\Bnote}{\@EN@note B}% 
    \newcommand{\Bnotelabel}{\@EN@notelabel B}% 
}} 
\DeclareOption{Bplain}{% 
  \AtEndOfPackage{% 
    \SetFootnoteHook{\@EN@MF@hook@B}%
    \let\@EN@MF@hook@B\@empty 
    \@ifundefined{SelectBnoteRule}{}{% 
      \expandafter\SelectFootnoteRule\SelectBnoteRule 
      \let\SelectBnoteRule\relax}% 
    \newfootnote{B}% 
    \newcommand{\Bnote}{\@EN@note B}% 
    \newcommand{\Bnotelabel}{\@EN@notelabel B}% 
}} 
\DeclareOption{Cpara}{% 
  \PassOptionsToPackage{para}{manyfoot}% 
  \AtEndOfPackage{% 
    \SetFootnoteHook{\@EN@MF@hook@C}%
    \let\@EN@MF@hook@C\@empty 
    \@ifundefined{SelectCnoteRule}{}{% 
      \expandafter\SelectFootnoteRule\SelectCnoteRule 
      \let\SelectCnoteRule\relax}% 
    \newfootnote[para]{C}% 
    \newcommand{\Cnote}{\@EN@note C}% 
    \newcommand{\Cnotelabel}{\@EN@notelabel C}% 
}} 
\DeclareOption{Cplain}{% 
  \AtEndOfPackage{% 
    \SetFootnoteHook{\@EN@MF@hook@C}%
    \let\@EN@MF@hook@C\@empty 
    \@ifundefined{SelectCnoteRule}{}{% 
      \expandafter\SelectFootnoteRule\SelectCnoteRule 
      \let\SelectCnoteRule\relax}% 
    \newfootnote{C}% 
    \newcommand{\Cnote}{\@EN@note C}% 
    \newcommand{\Cnotelabel}{\@EN@notelabel C}% 
}} 
\DeclareOption{Dpara}{% 
  \PassOptionsToPackage{para}{manyfoot}% 
  \AtEndOfPackage{% 
    \SetFootnoteHook{\@EN@MF@hook@D}%
    \let\@EN@MF@hook@D\@empty 
    \@ifundefined{SelectDnoteRule}{}{% 
      \expandafter\SelectFootnoteRule\SelectDnoteRule 
      \let\SelectDnoteRule\relax}% 
    \newfootnote[para]{D}% 
    \newcommand{\Dnote}{\@EN@note D}% 
    \newcommand{\Dnotelabel}{\@EN@notelabel D}% 
}} 
\DeclareOption{Dplain}{% 
  \AtEndOfPackage{% 
    \SetFootnoteHook{\@EN@MF@hook@D}%
    \let\@EN@MF@hook@D\@empty 
    \@ifundefined{SelectDnoteRule}{}{% 
      \expandafter\SelectFootnoteRule\SelectDnoteRule 
      \let\SelectDnoteRule\relax}% 
    \newfootnote{D}% 
    \newcommand{\Dnote}{\@EN@note D}% 
    \newcommand{\Dnotelabel}{\@EN@notelabel D}% 
}} 
\DeclareOption{Epara}{% 
  \PassOptionsToPackage{para}{manyfoot}% 
  \AtEndOfPackage{% 
    \SetFootnoteHook{\@EN@MF@hook@E}%
    \let\@EN@MF@hook@E\@empty 
    \@ifundefined{SelectEnoteRule}{}{% 
      \expandafter\SelectFootnoteRule\SelectEnoteRule 
      \let\SelectEnoteRule\relax}% 
    \newfootnote[para]{E}% 
    \newcommand{\Enote}{\@EN@note E}% 
    \newcommand{\Enotelabel}{\@EN@notelabel E}% 
}} 
\DeclareOption{Eplain}{% 
  \AtEndOfPackage{% 
    \SetFootnoteHook{\@EN@MF@hook@E}%
    \let\@EN@MF@hook@E\@empty 
    \@ifundefined{SelectEnoteRule}{}{% 
      \expandafter\SelectFootnoteRule\SelectEnoteRule 
      \let\SelectEnoteRule\relax}% 
    \newfootnote{E}% 
    \newcommand{\Enote}{\@EN@note E}% 
    \newcommand{\Enotelabel}{\@EN@notelabel E}% 
}} 
% This is as much as EDMAC provides. 
%% TODO: efficiency!? 
%% TODO: shorten previous by temporary defining macro 
%%       \@EN@tempa!? (dangerous)
%
% Load `mfparptc.sty' after `manyfoot.sty': 
\DeclareOption{edmacpara}{% 
  \AtEndOfPackage{% 
%     \RequirePackage{afterpackage}\AfterPackage{% TODO 
      \RequirePackage{mfparptc}[2006/06/26]}% 
% <- nccfoots v1.2. 
%     }% 
} 
%
%% TODO \afterpackage: 
% Load `edcntwd0.sty' after `lineno.sty': 
\DeclareOption{countoccurrences}{% 
  \AtEndOfPackage{\RequirePackage{edcntwd0}[2006/06/16]}} 
% <- first occurrence bug fix. 
% 
% `edtable' options remain "unknown" and thus are passed to 
% `lineno.sty'. 
% 
% Options for package `manyfoot': 
% Calling option `ruled' or `para' for `ednotes' is redundant, 
% but in case ... 
\DeclareOption{ruled}{\@EN@warning% 
  {Package Option `ruled' is redundant}}
\DeclareOption{para}{\@EN@warning% 
  {Package Option `para' is redundant}}
\DeclareOption{para*}{\PassOptionsToPackage{para*}{manyfoot}}
% Suppresses footnote indentation. 
% Overrides `para' as called from own options. 
\DeclareOption{perpage}{\PassOptionsToPackage{perpage}{manyfoot}} 
% 
% Options for package `lineno': 
\DeclareOption{mathnotes}{\PassOptionsToPackage{mathrefs}{lineno}}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{lineno}}
% 
% %% TODO: Really load lineno.sty here!? Otherwise remove options. 
% %% TODO: Interfaces for alternative auxiliary packages. 
% \ExecuteOptions{Apara} % \newcommand... bad for opposite option. 
\ProcessOptions 
% 
%% Load required packages: 
\RequirePackage[ruled\if@EN@Apara,para\fi]{manyfoot}[2005/05/11]
%% <- \SetFootnoteHook 
%% todo: Leave choice to user!? -> `unruled' -- \Select... suffices. 
%% TODO: ruled -> \Execute...!? 

\RequirePackage{lineno}[2004/10/11] 
% Hack for `lineno.sty' version. If \@LN@postlabel is defined, assume 
% `lineno' version 4 has been loaded. %% TODO 
\@ifundefined{@LN@postlabel}{% 
  \@EN@warning{We urge you to use `lineno.sty' version 4!}
  \RequirePackage{linenox0}[2004/08/12]%% No page break after heading 
%%                                        (left to `linenox1.sty'). 
}\relax 
% 
%% Execute option concerning first apparatus: 
\SetFootnoteHook{\@EN@MF@hook@A}
\let\@EN@MF@hook@A\@empty 
\@ifundefined{SelectAnoteRule}{}{% 
  \expandafter\SelectFootnoteRule\SelectAnoteRule 
  \let\SelectAnoteRule\relax}% 
\if@EN@Apara 
  \newfootnote[para]{A}% Needs `manyfoot.sty'. 
  \newcommand{\Anote}{\@EN@note A}% 
  \newcommand{\Anotelabel}{\@EN@notelabel A}% 
\else 
  \newfootnote{A}% 
  \newcommand{\Anote}{\@EN@note A}% 
  \newcommand{\Anotelabel}{\@EN@notelabel A}% 
\fi 
% 
%% User commands (if not defined in option code etc.): 
\newcommand{\addlemmaexpands}{\@EN@addtomacro\@EN@lemmaexpands}
%% <- local; cf. using LaTeX's \g@addto@macro: %% TODO: decide 
\newcommand{\showlemmaexpands}{% 
  \typeout{\string\@EN@lemmaexpands=\meaning\@EN@lemmaexpands}% 
} 
%
\DeclareTextCommandDefault{\textsymmdots}{% 
  .\kern\fontdimen3\font.\kern\fontdimen3\font.\@% 
} 
%
% 
%% Customizable commands: 
% 
\newcommand*{\sameline}[1]{\linesfmt{#1}} 
\newcommand*{\differentlines}[2]{\linesfmt{#1\textendash#2}} 
%% TODO: \linesfmt into \@EN@note!? 
\newcommand*{\linesfmt}[1]{\textbf{#1}\enspace} 
\newcommand*{\pageandline}[2]{#1.#2}
\newcommand*{\repeatref}[1]{#1} 
% \newcommand*{\repeatref}[1]{\textnormal{/}} 
\newcommand{\lemmafmt}[1]{#1\thinspace]\enskip} %% TODO: \long!? 
\newcommand{\lemmaellipsis}{\textsymmdots}
\newcommand{\notefmt}[1]{#1} \let\notefmt\@firstofone 
%% <- TODO: \long!? 
% \newcommand{\notefmt}[1]{#1.} 
% 
%% Core code: 

% Interface for manyfoot's \SetFootnoteHook facility: 
\newcommand{\PrecedeLevelWith}[2]{% 
  \expandafter \renewcommand \csname @EN@MF@hook@#1\endcsname{#2}}
% \renewcommand might help when an level is addressed that 
% has not been called through an option. 

% Auxiliary needed before calling \addlemmaexpands below: 
\long\def\@EN@addtomacro#1#2{% #1 cs, #2 new. 
% Local, cf. LaTeX's \g@addto@macro. 
  \expandafter\def\expandafter#1\expandafter{#1#2}% 
} 
% %% TODO: \long!? see building of lemmaarg and lemmatag. 
%% TODO: \tok@ so no doubling of `#'!? 
% 
% Our sphack for going around control sequences in text: 
\def\@EN@sphack{\relax 
  \ifhmode\ifdim\lastskip>\z@ \ignorespaces \fi\fi 
} 
% For ellipsis commands in moving arguments: 
\def\IfTypesetting{%
  \ifx\protect\@typeset@protect \expandafter \@firstoftwo 
  \else                         \expandafter \@secondoftwo 
  \fi 
}
% A nice shortcut (v1.23): 
\def\@EN@xpxpxp{\expandafter\expandafter\expandafter} 

% Basic handling of \Anote etc.: 
\long\def\@EN@note#1#2{% #1 note family, #2 lemma. 
  \IfTypesetting{%
    \def\@EN@notefam{#1}\@EN@process #2\<\>\@nil
  }{\@EN@robust@process #2\<\>\@nil}% 
} 
% 
% Lemma versions and preparing label: 
\long\def\@EN@process#1\<#2\>#3\@nil{% 
% Usage: \@EN@process #k\<\>\@nil. 
%% TODO: simplify using LaTeX's \in@!? 
% Implementation: don't leave control to user's input unless \<, \> 
% have been processed. <...> is postponed in main text. 
  \def\@EN@lemmaarg{\ignorespaces#1}% 
% \ifx\@EN@lemmaarg\@empty %% \fi %% TODO: complain!? 
%   \let\@EN@lemmatag\@EN@lemmaarg %% Would be overridden. 
  \ifx\@nnil#2#3\@nnil
    % No ellipsis, #1 all of user's input, dummy \<\> gobbled. 
    \@EN@addtomacro\@EN@lemmaarg\unskip
    \@EN@simplelemmatag 
    \@EN@mathlemmatag 
  \else 
    \@EN@simplelemmatag 
    \ifx\@nnil#3\@nnil % \<, but no \> from user. 
                       % #2 ends on \<, \>\@nil gobbled. 
      \@EN@gobble@pause#2\@nil\@nil 
    \else 
      % #3 ends on dummy \<\>. 
    \@EN@gobble@resume\@EN@gobble@pause#2\@EN@sphack\@nil
      % This \@EN@sphack replacing \> in main text. 
      #3\@nil\@nil
    \fi 
  \fi 
  \IfLemmaTag        % v1.3 
   {\@EN@lemmaarg\@gobble}% 
   %% TODO: \...process might otherwise be redirected to 
   %%       \...robust@process immediately. %% ??? 
   {\stepcounter{EN@label}% 
% Much must be expanded, especially for storing the note in a 
% hook (some tables): 
    \edef\@EN@tempa{\noexpand\@EN@putdown{EN@l\number\c@EN@label}}% 
    \@EN@xpxpxp \@EN@tempa 
      \expandafter \@EN@notefam \expandafter {\@EN@lemmatag}}% 
} 
\long\def\@EN@gobble@pause#1\<\@nil{%
  \futurelet\@let@token 
  %% <- TODO \@EN@finishlemma like \@EN@gobble@opt@till!? 
  \@EN@finishlemma #1\@nil} 
% #1 contains \@nil separating arguments. 
% Variant of LaTeX's \@ifnextchar---don't gobble spaces: 
\def\@EN@finishlemma{% 
  \ifx\@let@token<% 
    \let\@EN@next\@EN@xfinlem 
  \else 
    \def\@EN@next{\@EN@xfinlem<\lemmaellipsis>}% 
  \fi 
  \@EN@next 
} 
\long\def\@EN@xfinlem<#1>#2\@nil#3\@nil{% 
  \@EN@addtomacro\@EN@lemmaarg{\@EN@sphack#2#3\unskip}% 
  \@EN@addtomacro\@EN@lemmatag{#1\@EN@CWhook{#2}#3\unskip}% 
  \@EN@mathlemmatag 
  % %% TODO: doc.: final \unskip -> space properly! 
} 
% Brackets might have been used instead of <ELL>; however, 
% I am afraid that the user might use brackets at symbols to be 
% printed right here. Alternative (but needs extra code to test 
% for \extraellipsis): \extraellipsis{ELL}.                   %% TODO: decide 
% Think of keyboards without `<', `>'? 
\long\def\@EN@gobble@resume#1\>\@nil{#1} 
\let\@EN@CWhook\@gobble %% For counting words package. 
\def\@EN@simplelemmatag{\let\@EN@lemmatag\@EN@lemmaarg} 
% Useful for math mode extension as well. 
\let\@EN@mathlemmatag\relax %% Hook for math mode. 
% 
% \newcounter{EN@label} 
% % <- for \includeonly, v1.23; sufficient v1.3: 
\newcount\c@EN@label 
\@addtoreset{EN@label}{@ckpt}
% 
% New mechanism for ellipsis in lemma -- supporting nested lemmas 
% or at least lemmas shared by apparatuses exceeding one 
% (v1.22b 2006/01/13): 
\def\@EN@ltag@ellipsis{%
  \futurelet\@let@token\@EN@make@nested@lemmaellipsis}%
\def\@EN@make@nested@lemmaellipsis{% 
  \ifx\@let@token<% 
    \expandafter \@EN@ellipsis@only 
  \else 
    \expandafter \@EN@ellipsis@only 
      \expandafter <\expandafter \lemmaellipsis \expandafter >% 
  \fi}
\long\def\@EN@ellipsis@only<#1>#2\>{#1}
% 
% .aux entries, note, and lemma in main text: 
% (v1.1: much changes. I just remove what was before, see stored 
%  older version.) 
\long\def\@EN@putdown#1#2#3#4{% 
% #1 label, #2 note family, #3 lemma tag, #4 note. 
% %% TODO: \long!? 
  \linelabel{-#1}% Ensures hmode. 
% Insert footnote: 
 \@EN@hookfn{% 
  \csname Footnotetext#2\endcsname\@empty{% 
% \@empty v1.12, due to HCY's report of spurious footnote marks. 
    \csname#2notefmt\endcsname 
    \let\@currentlabel\@empty 
    \label{#1}% Need page number of note. 
    \let\nopunct\@gobble % or by \if... 
% Print line numbers: 
    \@ifundefined{r@#1}% 
%%% ...unknown + ...incomplete@ref v1.23: %%%
      {\differentlines\@EN@unknown\@EN@unknown}% 
      {\let\@EN@incomplete@ref\relax 
       \@EN@xpxpxp \@EN@extract\csname r@#1\endcsname 
         \@EN@incomplete@ref\@EN@incomplete@ref 
           \@EN@incomplete@ref\@EN@incomplete@ref
       \ifx\@EN@elemp\@EN@Incomplete
         \G@refundefinedtrue 
         \let\@EN@incomplete@ref\@EN@unknown 
       \fi 
       \@tempswatrue
       \ifx\@EN@bleml\@EN@eleml \else \@tempswafalse \fi 
% Restart of line numbers / different page!? 
       \ifx\@EN@blemp\@EN@elemp \else \@tempswafalse \fi 
       \if@tempswa 
         \sameline{\@EN@plref\@EN@blemp\@EN@bleml}% 
       \else 
         \@EN@lastline@z@
         \differentlines{\@EN@plref\@EN@blemp\@EN@bleml}%
                        {\ifx\@EN@blemp\@EN@elemp       % v1.23 
                           \@EN@eleml
                         \else 
                           \pageandline\@EN@elemp\@EN@eleml 
                         \fi}% 
%                         {\@EN@plref\@EN@elemp\@EN@eleml}%
         \@EN@lastline@z@
       \fi}% 
%     \strut % Redundant (\rule\z@\footnotesep TODO: CHECK)
%     \expandafter \let \csname r@#1\endcsname \relax %% v1.1. 
%% <- 2005/02/21: No, need label for testing. 
    \lemmafmt{{\@EN@lemmaexpands#3}}% 
    \notefmt{#4}% 
  }% 
 }% 
  % Lemma in main text: 
  \nobreak \hskip\z@skip %% 2006/01/12 cf. german.sty: \allowhyphens 
  \@EN@lemmaarg %% Should not end with space so \linelabel... 
%% \allowhyphens not needed here (tested) 2006/01/12 
  \linelabel{+#1}% 
  % \csname #1rightmark\endcsname %% Suggested. 
} 
\let\@EN@hookfn\@firstofone 
\def\@EN@extract#1#2#3#4#5{% 
% #1 note page, #2 first lemma line, #3 first lemma page, 
%               #4 last  lemma line  #5 last  lemma page.
  \def\@EN@tempa{#1}% 
  \def\@EN@bleml{#2}\def\@EN@blemp{#3}% 
  \def\@EN@eleml{#4}\def\@EN@elemp{#5}% 
}
\def\@EN@unknown{\textnormal{\bfseries ??}}             % v1.23 
\def\@EN@Incomplete{\@EN@incomplete@ref}                % v1.23 
\def\@EN@lastline@z@{\global\let\@EN@lastline\z@} 
\@EN@lastline@z@ % Next line number in note explicitly. 
\def\@EN@plref#1#2{% #1 page, #2 line. 
%                    \@EN@tempa is note page from \@EN@extract. 
  \ifx#1\@EN@tempa      %% Note and lemma part on same page. 
    \ifx#2\@EN@lastline %% Same line as before. 
      \repeatref#2%     %% v1.1: changed use!
    \else 
      #2\global\let\@EN@lastline#2%
    \fi 
  \else 
    \pageandline#1#2%   %% v1.1: new! 
  \fi 
}
% 
% Expanding in note version of lemma: 
\let\@EN@lemmaexpands\@empty 
\long\def\@EN@gobble{\@EN@sphack\@gobble}
\long\def\@EN@gobbletwo{\@EN@sphack\@gobbletwo}
\long\def\@EN@secondofthree#1#2#3{\@EN@sphack#2}
\let\IfLemmaTag\@secondoftwo % v1.3 
% <- Had thought I would use it more than once ... 
%    ... maybe for replacing some \addlemmaexpands entries: 
\addlemmaexpands{% 
  \let\IfLemmaTag\@firstoftwo 
  \let\notinnote\@EN@gobble 
  \let\@EN@note\@EN@secondofthree 
  \let\@EN@notelabel\@EN@gobbletwo 
%   \let\resume\notinnote \let\pause\notinnote 
  % <- v1.23c -- Thanks to Roy Flechner. 
%   \let\pause\@EN@pause@ltag % v1.3 
%   \let\donote\@EN@gobbletwo 
  \let\label\notinnote \let\linelabel\notinnote 
  \let\<\@EN@ltag@ellipsis 
} 
%% <- TODO: user commands only!? (no \let)
%% TODO: cf. EDMAC's tag (fonts? accents? -- lineno.sty commands?) 
\let\notinnote\@firstofone 
% 
% Variant of \@EN@process when moving: (v1.21/1.22) 
\long\def\@EN@robust@process#1\<#2\>#3\@nil#4{% 
  #1% 
  \ifx\@nnil#2#3\@nnil
    % No ellipsis, #1 all of user's input, dummy \<\> gobbled. 
  \else 
    \@EN@sphack@aux{}%        for ensuing space in .aux, v1.3
    \ifx\@nnil#3\@nnil % \<, but no \> from user. 
      % #2 ends on \<, \>\@nil gobbled. 
      \@EN@robust@gobble@pause#2\@nil 
    \else % #3 ends on dummy \<\>. 
      \@EN@gobble@resume
        \@EN@robust@gobble@pause#2\@EN@sphack@aux{}#3\@nil\@nil 
    \fi 
  \fi 
} 
\DeclareRobustCommand{\@EN@sphack@aux}{\@EN@sphack\@gobble}
\long\def\@EN@robust@gobble@pause#1\<\@nil{% 
  \@EN@gobble@opt@till#1<>\@nil}
\long\def\@EN@gobble@opt@till#1<#2>#3\@nil{% 
  \ifx\@nnil#3\@nnil 
    #1\ifx\@nnil#2\@nnil \else 
        <\@EN@gobble@less#2\@nil \fi % v1.3
  \else 
    \ifx\@nnil#1\@nnil\else#1<#2>\fi \@EN@gobble@diamond #3\@nil 
  \fi}
  % <- TODO weak against aggressive expansion 
\long\def\@EN@gobble@less#1<\@nil{}
\long\def\@EN@gobble@diamond#1<>\@nil{#1}
% 
% Shorthand macros for lemma in moving argument: 
\newcommand\RobustTestOpt{% 
  \ifx\protect\@typeset@protect \else 
    \expandafter \@EN@robust@test@opt 
  \fi 
}
\long\def\@EN@robust@test@opt#1#2#{% 
  \ifx\@nnil#2\@nnil 
    \@EN@xpxpxp \@EN@expand@with@default 
  \else 
    \@EN@xpxpxp \@EN@expand@with@option 
  \fi 
  #1#2} 
\newcommand\@EN@expand@with@default[4]{#3[{#4}]}
\newcommand\@EN@expand@with@option[4]{#3}

\newcommand\NewEdnotesCommand{% 
  \@ifstar{\@EN@newcommand*}{\@EN@newcommand{}}}
\def\@EN@newcommand#1#2[#3][#4]{% 
  \expandafter \newcommand \expandafter #2\expandafter {% 
    \expandafter \RobustTestOpt \csname \string #2\endcsname}
  \def\@tempa{\newcommand#1}% 
  \expandafter \@tempa \csname \string #2\endcsname[#3][#4]} 

% Handling \Anotelabel etc.: 
% \@EN@lemmaarg is to become the LEMMA argument for \@EN@process. 
% A first version is obtained by reading unto the \donote 
% bearing the same label. \@EN@lemmaarg is then rebuilt, 
% replacing \pause and \resume by \< and \>. 
\def\@EN@notelabel#1#2{% #1 note family, #2 label. 
  \IfTypesetting{%      v1.3 
    \def\@EN@notefam{#1}% 
    \def\@EN@laplabel{#2}% 
    \let\@EN@lemmaarg\@empty 
    \let\@EN@next\@EN@firstnext 
    \@EN@next
  }\relax     % Second argument: otherwise do nothing. 
% The following removed braces urgently needed: 
%   \@EN@getlabel\donote 
%     {\@EN@laplabel 
%      \expandafter\def\expandafter\@EN@next\expandafter 
%        {\expandafter\@EN@replacepause
%           \@EN@lemmaarg\pause\@nil\resume\@nil}% 
%      \else 
%        \@EN@appendwrong
%      }% 
} 
\long\def\@EN@firstnext#1\donote#2#3{% 
  \def\@EN@tempa{#2}% 
  \ifx \@EN@tempa \@EN@laplabel 
    \@EN@addtomacro\@EN@lemmaarg{#1}%
    \expandafter \def \expandafter \@EN@next \expandafter {% 
      \expandafter \@EN@replacepause
        \@EN@lemmaarg \pause\@nil\resume\@nil{#3}}%
  \else 
    \@EN@addtomacro\@EN@lemmaarg{#1\donote{#2}{#3}}%
  \fi 
  \@EN@next 
}% 
\def\@EN@getlabel#1#2{% 
% jump to cs #1, #2: on \@EN@tempa=... 
%   \let#2\@empty 
  \def\@EN@appendwrong{% 
    \expandafter\@EN@addtomacro \expandafter\@EN@lemmaarg 
        \expandafter {\expandafter#1\expandafter{\@EN@tempa}}% 
  }% 
  \long\def\@EN@next##1#1##2{% 
  % %% TODO: \let [pre-defined] for efficiency!? 
    \@EN@addtomacro\@EN@lemmaarg{##1}% 
    \def\@EN@tempa{##2}% 
    \ifx\@EN@tempa#2\fi 
    \@EN@next 
  }% 
  \@EN@next 
} 
\def\@EN@replacepause{% 
  \let\@EN@lemmaarg\@empty 
  \@EN@getlabel\pause 
    {\@nnil 
       \def\@EN@next\resume\@nil{\@EN@donote}% 
     \else 
       \ifx\@EN@tempa\@EN@laplabel 
         \@EN@addtomacro\@EN@lemmaarg\<% 
         \let\@EN@next\@EN@replaceresume 
       \else
         \@EN@appendwrong
       \fi 
     }% 
} 
\long\def\@EN@replaceresume#1\pause\@nil{% 
  \@EN@getlabel\resume 
    {\@nnil 
       \let\@EN@next\@EN@donote
     \else 
       \ifx\@EN@tempa\@EN@laplabel 
         \long\def\@EN@next####1\resume\@nil 
         % %% TODO: \let [pre-defined] for efficiency!? 
           {\@EN@addtomacro\@EN@lemmaarg{\>####1}\@EN@donote}% 
       \else 
         \@EN@appendwrong
       \fi 
     }% 
  #1% \resume\@nil ahead. 
} 
\def\@EN@donote{\expandafter\@EN@process\@EN@lemmaarg \<\>\@nil} 
% 
% Variants for \@EN@notelabel in lemma tag or when moving: 
% (v1.3)
\def\@EN@notelabel@cmd#1#2#3{% 
  \IfLemmaTag{#2}{%
    \IfTypesetting{% 
      \PackageError{ednotes}{Misplaced \string#1}{% 
                    Missing ...notelabel; 
                    cf. package documentation.}% 
  }{\@EN@sphack@aux{}#3}}} 
% 
\newcommand\pause{% 
  \@EN@notelabel@cmd\pause
    {\futurelet\@let@token\@EN@pause@ltag}\@EN@pause@aux} 
\def\@EN@pause@ltag#1{% 
  \@EN@sphack\ifx\@let@token<\expandafter\@EN@gobble@opt\fi} 
\def\@EN@gobble@opt<#1>{} 
\long\def\@EN@pause@aux#1#2\resume{% 
  \@EN@gobble@opt@till #2<>\@nil\resume}
% 
\newcommand\resume{% 
  \@EN@notelabel@cmd\resume\@EN@gobble\@gobble}
\newcommand\donote{% 
  \@EN@notelabel@cmd\donote\@EN@gobbletwo\@gobbletwo}

% v1.1: reduce number of control strings from \newlabel. 
% We keep using \linelabel and \label for kind of simplicity and 
% because modifying them would hardly save time or save us from 
% the difficulties that we face here. Instead we modify 
% \newlabel to prevent it from dealing with labels coming from 
% annotations in the usual way. 
% 
% Storing and restoring of \newlabel and `lineno.sty's 
% \getpagewiselinenumber: %% TODO: do without the latter anyway? 
\let\@EN@newlabel\newlabel 
\let\@EN@getpagewiselno\getpagewiselinenumber
\let\getpagewiselinenumber\relax 
\AtBeginDocument{\let\getpagewiselinenumber\@EN@getpagewiselno} 
%
% For each lemma and note, there will be one macro carrying the 
% corresponding line and page numbers. Below, \@EN@tempa will 
% carry the name of that macro. \@EN@bleml will be the line 
% number, \@EN@blemp the page number from the \newlabel arguments. 
% \@EN@extractcslp will do the assignments for \@EN@tempa, 
% \@EN@bleml, and \@EN@blemp. Three \newlabel's will come to 
% deliver the numbers for one note, each will add to the 
% expansion code of the corresponding macro. The page number of 
% the note is attached to the left; ensuring that it is on the 
% same place in each case. (Indeed, usually the .aux entry from 
% the note comes .aux after the final entry from the lemma, but 
% when a page break happens within the latter, this order may 
% reverse.) \@EN@addtolabeldef will do this. It will at first 
% look as if \@EN@extractcslp and \@EN@addtolabeldef should 
% better have been merged into one single macro; however, we 
% need them for the final testing function below, where they 
% appear in different contexts. 
% TODO: The format of the numbers list is 
% {<notepage>}{<blemline>}{<blempage>}{<elemline>}{<elempage>} 
% This is LaTeX-like, cf. storing of the numbers for a usual 
% \ref. It is easy to read the second or so term. Yet it wastes 
% a lot of memory with critical editions. It might be better to 
% use a single token as separator, as (L)EDMAC do. 
% 
\def\@EN@addtolabeldef#1#2{% add #1 left, #2 right. 
  \expandafter \protected@xdef \@EN@tempa{% 
    #1\@EN@tempa#2}} 
\def\@EN@fornotelabel#1#2#3{% #1 sign, #2 label, #3 def.
  \in@{\@@#1EN@l}{\@@#2}% LaTeX's \in@, \ifin@. 
  \ifin@ 
    \@EN@extractcslp#2\@nil#3\@nil 
% Now, in one step, \@EN@tempa expands to the name of the macro 
% that \newlabel defines at \begin{document}. 
% The \newlabel with `-' will always come first, so this macro 
% has not been defined yet: 
    \expandafter\@firstoftwo
  \else 
    \expandafter\@secondoftwo 
  \fi} 
\def\newlabel#1#2{% 
% It should be possible to read #2 later, but it's difficult. 
% ...extractcslp might be split into parts of ...fornotelabel 
% and some other macro doing more. [TODO]
  \@EN@fornotelabel-{#1}{#2}{% 
    \@EN@addtolabeldef\@gobble{{\@EN@bleml}{\@EN@blemp}}% 
%    \typeout{\expandafter\string\@EN@tempa \space
%           (-) \expandafter\meaning\@EN@tempa}%
  }{\@EN@fornotelabel+{#1}{#2}{% 
      \@EN@addtolabeldef{}{{\@EN@bleml}{\@EN@blemp}}% 
%    \typeout{\expandafter\string\@EN@tempa \space
%             (+) \expandafter\meaning\@EN@tempa}%
    }{\@EN@fornotelabel{}{#1}{#2}{% 
        \@EN@addtolabeldef{{\@EN@blemp}}{}% 
%    \typeout{\expandafter\string\@EN@tempa \space
%             (p) \expandafter\meaning\@EN@tempa}%
      }{\@EN@newlabel{#1}{#2}}% 
    }% +
  }% -
} 
\@onlypreamble\newlabel % Unlike LaTeX, but get rid of all of 
%                       % this. A new version comes \AtEnd...
% 
\def\@EN@extractcslp#1E#2\@nil#3#4#5\@nil{% 
% #1 "sign", #2 label after `E'; #5 for `hyperref.sty'. 
% The `E' is needed when neither - nor + ... 
  \expandafter \def \expandafter \@EN@tempa \expandafter{% 
    \csname r@E#2\endcsname}% 
% Use `r@' for \ref, cf. \@EN@putdown. 
  \def\@EN@bleml{#3}\def\@EN@blemp{#4}}
% <- Just avoid additional control strings. 
% No \@onlypreamble, use it in the final run as well. 
% 
% v1.1: final testing of label changes with the compressed 
% definitions (cf. `lblchng1.sty'). 
% We use the compression mechanism from the beginning to 
% determine the definitions for the next run. To compare them 
% with the present definitions, the latter must be stored 
% before. With nesting or overlapping lemmas, other notes may 
% send their information before the new definition for one note 
% has been finished. And when we receive data from these other 
% notes, we must store their previous data as well. So we cannot 
% use one single control string to \let it be the string that 
% carries the previous data corresponding to a note. Yet we 
% don't want to double the number of strings corresponding to 
% notes here. So we store the definitions in one single list, 
% yet only for as long as the comparison has not been completed. 
%
% To tell to the third \newlabel that it is the third indeed, 
% the second \newlabel adds \@EN@ready together with number(s): 
\def\@EN@test@addtolabeldef#1#2{% 
  \expandafter 
  \ifx \@EN@tempa \relax \else 
% Test whether this is the third \newlabel for the note: 
    \@EN@xpxpxp \in@ 
      \expandafter\expandafter\expandafter \@EN@ready 
        \expandafter\expandafter\expandafter {\@EN@tempa}% 
    \ifin@ \let\@EN@ready\@empty \fi
    \@EN@addtolabeldef{#1}{#2}% Warning: should not use \in@! 
    \ifin@ 
      \let\@EN@ready\relax 
      \expandafter\@EN@prepare@fromtl\@EN@tempa\@nil 
      \expandafter\@tempa\@EN@testinglist\@nil 
      \expandafter 
      \ifx \@EN@tempa \@tempa \else
        \@tempswatrue 
        \ifx\@tempa\relax \else 
          \expandafter\@EN@takepagesto\@tempa\@tempa 
          \@EN@xpxpxp \@EN@takepagesto\@EN@tempa\@EN@tempa
% The message may come when line numbers have changed, not page 
% numbers. This may puzzle some users, but should be harmless. 
          \typeout{^^JPackage `ednotes.sty':^^J% 
            *** A lemma or note moved. Page numbers 
            \@tempa\space turned into \@EN@tempa.^^J***
            Rerun and watch whether they come to rest and references 
            get right.^^J*** If they don't, use \string\pagebreak\space 
            or \string\warningpagebreak\space to force^^J*** the earlier 
            of oscillating page breaks.^^J*** (Cf. package documentation 
            on `oscillating page breaks'.)}% 
          \let\newlabel\@EN@newlabel 
          \def\@newl@bel{\@gobblefour\relax}% Cf. `lblchng1.sty'. 
        \fi 
      \fi 
    \fi
  \fi 
}%
\let\@EN@ready\relax 
\let\@EN@testinglist\@empty 
\def\@EN@testlabel#1#2{% Don't change \@testdef -- `lblchng1.sty'.
% Cf. our \newlabel for details. \@EN@testlabel is an extension 
% of it. 
%  \typeout{testinglist: \meaning\@EN@testinglist}% 
  \@EN@fornotelabel-{#1}{#2}{% 
    \expandafter
    \ifx \@EN@tempa \relax  % Label #1 not used in previous run. 
      \@tempswatrue     % Just to behave like LaTeX's \@testdef. 
    \else       % Only otherwise delicate procedure is required. 
% Put to testing list:
      \protected@edef \@EN@testinglist{\@EN@testinglist
          \expandafter \protect \@EN@tempa{\@EN@tempa}}% 
% First contribution to ...: 
      \@EN@addtolabeldef\@gobble{{\@EN@bleml}{\@EN@blemp}}% 
    \fi 
%    \typeout{\expandafter\string\@EN@tempa \space
%           (-) \expandafter\meaning\@EN@tempa}%
  }{\@EN@fornotelabel+{#1}{#2}{% 
      \@EN@test@addtolabeldef\@EN@ready{% 
        {\@EN@bleml}{\@EN@blemp}}% 
%    \typeout{\expandafter\string\@EN@tempa \space
%             (+) \expandafter\meaning\@EN@tempa}%
    }{\@EN@fornotelabel{}{#1}{#2}{% 
        \@EN@test@addtolabeldef{{\@EN@blemp}}\@EN@ready 
%    \typeout{\expandafter\string\@EN@tempa \space
%             (p) \expandafter\meaning\@EN@tempa}%
      }{\@EN@newlabel{#1}{#2}}% 
    }% +
  }% -
} 
% 
\def\@EN@prepare@fromtl#1\@nil{% 
  \def\@tempa##1\protect#1##2##3\@nil{%
    \def\@tempa{##2}\def\@EN@testinglist{##1##3}}}
\def\@EN@takepagesto#1#2#3#4#5#6{\def#6{#1, #3, #5}}
\AtEndDocument{\let\newlabel\@EN@testlabel
  \let\getpagewiselinenumber\relax} %% TODO without!? 
% 
% v1.23: \warningpagebreak: 
\AtEndDocument{\@EN@pagebreaks@finalwarn}
\let\@EN@pagebreaks@finalwarn\relax 
\def\@EN@pagebreaksfinalwarn{% 
  \typeout{^^J% 
    Package ednotes: There have been \string\warningpagebreak\space 
    occurrences.^^JFor your final version, we recommend checking 
    whether they still are^^Jappropriate.^^J}% 
}
\def\warningpagebreak{% 
  \@EN@warning{Page break (\string\warningpagebreak) 
    from user^^J-- still appropriate in final version!? --}% 
  \global\let\@EN@pagebreaks@finalwarn\@EN@pagebreaksfinalwarn 
  \pagebreak}
%% TODO: \afterassignment possible anywhere? 
%% TODO: remove testing \typeout's. 

%% Reminder about `mfparxsp.sty': 
\AtBeginDocument{% 
  \@ifpackageloaded{mfparxsp}{% 
    \PackageWarningNoLine{ednotes}{% 
%% TODO: \PackageError? 
      You have loaded `mfparxsp.sty',\MessageBreak 
      which defines \string\MFparaxbuffer.\MessageBreak 
      We recommend, instead, \string\ExtraParaSkip\space 
        \MessageBreak 
      from `manyfoot.sty' version 1.7\MessageBreak 
      (CTAN:macros/latex/ncctools).\MessageBreak 
      Cf. ednotes package documentation% 
    }% 
  }\relax 
}

\endinput 

%% TODO: \newcommand whenever possible!? 
%% TODO: with v1.1: warn about \label{[-+]EN@l...}. Maybe make 
%%       \label and \linelabel internal, new user versions check 
%%       the argument. 
%% TODO: warn about \usepackage{foo} where foo is loaded by option!? 
%% TODO: .dtx 
%% TODO: license for *bundle* 
%% TODO: ... or cf. the brief and clear conditions in Eurofont 
%%       (Rowland McDonnell) 
%% TODO: Bigfoot/e-TeX (Kastrup)
%% TODO: compatibility with Parallel.sty -- Sergei Mariev 2003/06/19. 
%%       (hopeless, I'm afraid) -- 2005/02/19: Cf. Peter Wilson's 
%%       ledpar. 

%% VERSION HISTORY: 
v0.36 2003/01/13 First version sent around. 
v0.37 2003/01/22 Added version history and reference to 
                 `mfparptc.sty'. 
v0.38 2003/01/27 Improved copyright notice. 
v0.39 2003/02/06 Documentation: output + splitting problem, 
                 explanations of recommended packages. 
v0.4  2003/03/03 Splitting problem remedied by linenox0. 
v0.41 2003/03/03 our owns -> ourselves. + !? 
v0.42 2003/03/04 Some remarks/TODOs, especially concerning \SplitNote, 
                 changed lppl hint. 
v0.43 2003/03/23 Doc.: "may" -> "must" [not be hidden]. 
v0.44 2003/03/24 Took e-mail addresses list from edtab; 
                 added comparison with LEDMAC. 
                 TODOs for reading `MFPartPtc.sty'; 
                 \Require...{linenox0}[2003/03/23]; 
                 changed acknowledgements: still remains? 
                 Stephan's approach, encouragement, U.L.; 
                 minor changes in `overview'; point to 
                 EDMAC homepage; TODO: ruled user's choice? 
                 ---Sent to Peter and Dominik. 
v0.45 2003/03/28 LEDMAC hint: replaced `Correct me ...' by 
                 "single printable file" + "enhanced"; 
                 Version History: 04 -> 03 at v0.44; 
                 MFParPtc ToDo below: !! -> !? 
                 ---Sent to Peter. 
v0.46 2003/04/15 \renewcommand -> \newcommand in \Anotefmt 
                 customization---thanks to Robert Alessi! 
                 added bug report acknowledgement. 
v0.47 2003/05/01 Added \@ in \textsymmdots. 
v0.48 2003/06/22 Replaced \@secondoftwo by \@EN@second (Hyperref); 
                 placed \let\@EN@lastline correctly---both 
                 thanks to Sergei Mariev! 
      2003/07/09 Added note on `hyperref.sty'. 
v0.49 2003/09/03 Added documentation to evade the \donote bug. 
      2003/11/06 Require corrected `linenox0.sty'. 
      2003/11/13 Require corrected `lineno.sty'. 
v0.5b 2003/12/30 Added \@EN@first and \@EN@gtempa for \repeatref. 
      2003/12/31 Removed argument redundancy in \addlemmaexpands. 
v0.5  2004/01/04 Added \@EN@CWhook for counting words package. 
v0.51 2004/01/06 Require corrected `linenox0.sty'. 
v0.6  2004/03/01 Removed two lines from preamble and mention of 
                 \donote bug (v0.49), fixed the latter. 
v0.61 2004/04/15 Changed `Comparison with LEDMAC' concerning TABMAC 
                 and implementation, reformulated `acknowledgements'. 
                 Unified quotation marks with `....sty'. 
      2004/04/22 Removed `wait vor Alex...' and `CTAN soon' 
                 concerning LEDMAC. 
      2004/04/28 Removed `New with v0.4'. 
      2004/05/12 Removed `few weeks' before `similar' in doc., 
                 changed doc. concerning effects of different 
                 implementations. Mentioned indexing, `Edstanza', 
                 "minipage", and sidenotes concerning LEDMAC. 
                 Included Florian Kragl in acknowledgements. 
                 Added `A problem' (notes height estimation). 
                 Sent around. Added Christian to copyright, 
                 L"uck -> L\"uck. `edtab02' -> `edtable'. 
      2004/07/20 Suggested \csname #2leftmark etc. 
      2004/07/22 Used \DeclareOption*, removed `BETA TEST RELEASE'. 
v0.62 2004/08/16 \RequirePackage{linenox0}[2004/08/12], LPPL v1.3; 
                 \@EN@shortlemmatag, \@EN@initlemmatag, 
                 \@EN@finmathlemmatag. 
v0.63 2004/08/16 Replaced previous by \@EN@simplelemmatag and 
                 \@EN@mathlemmatag. 
v0.64 2004/08/19 Removed stars from ...newcommands of macros 
                 that have no parameter, added some with 
                 parameters (undid this?), however made 
                 \lemmafmt and \notefmt long (star). 
      2004/08/22 Changed `Packages required'. 
      2004/08/31 Rearranged preamble concerning maintenance. 
v0.7  2004/09/19 \Req...{linenox0}... etc. only with lineno v<4. 
      2004/09/20 Adjustment of instructions to bundle changes; 
                 `I.' after `Alexander'. 
v0.71 2004/09/21 Took explanation for \ExtraP... from `mfparxsp.sty'
                 and removed mention of the latter; 
                 removed a comment mark from a documentation line. 
                 Changed lineno.sty/tex into ...pdf. 
v1.0  2004/10/07 Changed documentation for additional options for 
                 `edtable', `edmacpara', `countoccurrences'; hint at 
                 TUGboat article; removed mention of `linenox0.sty'. 
      2004/10/08 Replaced \newif\if@EN@Apara@; replaced redundant 
                 option passes redundancy warnings; options 
                 `edmacpara' and `countoccurences'; removed TODOs 
                 concerning `mfparptc.sty'. 
      2004/10/11 `perpage' option; acknowledgements for co-operation. 
      2004/10/13 Require debugged `mfparptc.sty' and `edcntwd0.sty' 
                 as well as `lineno.sty' equipped with new options. 
      2004/10/18 Reminder on `mfparxsp.sty', changed TODOs. 
v1.0a 2004/11/07 LPPL v1.3a. 
v1.0b 2005/01/10 Contact via http. 
      2005/01/19 Mentioned `ellipsis' package. 
v1.01 2005/02/05 \Packagewarning -> \PackageWarning. 
v1.1b 2005/02/20 Documentation: `ledpar', `ednotugb.pdf', 
                 implementation. Only one cs per note -> much 
                 different! Require new `edcntwd0,sty'. 
                 With v1.1b, testing (`lblchng1.sty') is 
                 disabled. 
v1.1c 2005/02/20 Deleted \tracingmacros, earlier kept erroneously. 
v1.1d 2005/02/21 Final testing of label changes. Moved v1.1 macros 
                 towards end. 
      2005/03/06 Reimplemented compression (v1.1b) and final 
                 testing (v1.1d) very much + minor changes. 
v1.1  2005/03/08 Notes on \repeatref, \pageandline, and new 
                 `edcntwd0.sty' version. Top: `editory notes' -> 
                 `critical editions'. Acknowledgement to Roy 
                 Flechner. 
v1.11 2005/04/07 Doc typo with ...plref. 
      2005/04/09 \Provides...: `editory notes' -> `critical 
                 editions'. Sent to Ednotes.news . 
v1.12 2005/04/09 \@empty with Footnotetext... 
v1.12a    /04/09 Acknowl. Hillel Chayim Yisraeli. 
      2005/04/10 Supplied LPPL URL, corrected \file... 
                 Sent to CTAN and Ednotes.news . 
v1.12b    /04/11 address -> URL .
      2005/05/01 Due to removing \@EN@first, older version of 
                 edcntwd0.sty suffices. 
      2005/05/12 Remark on hyperref changed due to 
                 lineno.sty v4.3 . 
[not sent, not tested] 
v1.12c    /09/21 Doubled some hash marks in explanation of 
                 customization, adapted doc. to \@EN@sphack. 
[not sent]

v1.2b 2005/09/22 Updated doc. wrt. availability of manyfoot.sty; 
                 \PrecedeLevelWith . 
      2005/09/24 \let\notthislemma\@firstofone (was bug without). 
v1.2  2005/10/01 \notthislemma -> \notinnote; explained \Precede... 
                 Sent to CTAN. 
v1.2a 2005/10/02 supplied mention of HCY for v1.12. [not sent]
v1.21 2005/10/12 \@EN@process tests #3 on empty without \@EN@tempa; 
                 withdummy -> gobble@pause, 
                 killresume -> gobble@resume; 
                 \@EN@robust@process. 
v1.22b    /11/21 \if@EN@in@note; \@EN@firstnext. 
      2005/11/28 @EN@in@note -> LemmaTag; \@EN@gobble[two] 
      2006/01/12 \allowhyphens in \@EN@putdown. 
      2006/01/13 New \<<...>...\>. [to Lekhtman]
      2006/01/15 \long with \@EN@lemma@ellipsis; 
                 removed general definition of \< . 
v1.22 2006/01/16 \@EN@robust@process now really gobbles note, 
                 removed wrong \@empty from \@EN@gobble@diamond; 
                 \RobustTestOpt, \NewEdnotesCommand. 
v1.23 2006/01/23 Example on \NewEdnotesCommand: default "B" -> "A". 
      2006/06/07 Changed page-line algorithm with \differentlines; 
                 edcntwd0.sty v0.32 required; 
                 \c@EN@label LaTeX counter; 
                 \expandafter\expandafter\expandafter -> \@EN@xpxpxp
      2006/06/15 \@EN@warning; edcntwd0.sty v0.32a required. 
      2006/06/16 Additional screen advice with oscillating page breaks 
                 + explanation in manual (\warningpagebreak). 
v1.23a    /06/20 Corrected \RequirePackage{edcntwd0}-date. 
v1.23b    /06/22 Require manyfoot v1.9. 
          /06/26 LPPL v1.3c; require mfparptc v4.1; remarks on 
                 hyphenation of first word in lemma tag. 
v1.23c    /06/27 Fix for \pause/\resume in lemma tag (Roy Flechner, 
                 a few day later Christian Tapp as well). 
v1.3  2006/06/27 affirmed \long's (were TODOs); simplified 
                 \@EN@gobble@pause. 
      2006/06/28 \@EN@robust@process refined; gobble \>\@nil etc.; 
                 \@EN@sphack@aux. 
      2006/06/29 \ifLemmaTag -> \IfLemmaTag (-> doc.); 
                 lemma@ellipsis -> ltag@ellipsis; \IfTypesetting; 
                 \@EN@notelabel@cmd, \@EN@pause@ltag, \@EN@pause@aux. 
      2006/07/05 \SelectAnoteRule etc. supporting 
                 manyfoot's \SelectFootnoteRule. 
      2006/07/06 \includeonly just with \@addtoreset{@ckpt}. 
      [Sent to CTAN, Christian, Sergei]
v1.3a 2006/07/20 Blank screen line above/below final warning. 
      2006/10/05 News about perpage.