aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ekdosis.dtx24
1 files changed, 22 insertions, 2 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 8419858..ef3fd93 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -531,7 +531,21 @@ idno={}, msName={}, origDate={}][3]{%
531 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b} 531 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}
532 = 532 =
533 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e} 533 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}
534 %
535 \ifsubsq@unit%
536 %
537 \ifnum%
538 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}
539 =
540 \getrefnumber{\luadirect{tex.sprint(ekdosis.getprevlnlab())}-b}
541 \else
534 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}% 542 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}%
543 \fi
544 %
545 \else
546 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}%
547 \fi
548 %
535 \else 549 \else
536 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}--% 550 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}--%
537 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}% 551 \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}%
@@ -1418,10 +1432,12 @@ end
1418local lnlabs = {} 1432local lnlabs = {}
1419local lnlab_salt = 0 1433local lnlab_salt = 0
1420local current_lnlab = nil 1434local current_lnlab = nil
1435local prev_lnlab = nil
1421local current_lemma = nil 1436local current_lemma = nil
1422local salt = 0 1437local salt = 0
1423 1438
1424function ekdosis.dolnlab(str) 1439function ekdosis.dolnlab(str)
1440 prev_lnlab = current_lnlab
1425 current_lemma = str 1441 current_lemma = str
1426 i = md5.sumhexa(str) 1442 i = md5.sumhexa(str)
1427 if not mdvisintable(lnlabs, i) then 1443 if not mdvisintable(lnlabs, i) then
@@ -1431,14 +1447,18 @@ function ekdosis.dolnlab(str)
1431 table.insert(lnlabs, i) 1447 table.insert(lnlabs, i)
1432 salt = salt + 1 1448 salt = salt + 1
1433 end 1449 end
1434 current_lnlab = i 1450 current_lnlab = i
1435 return true 1451 return true
1436end 1452end
1437 1453
1438function ekdosis.getlnlab() 1454function ekdosis.getlnlab()
1439 return current_lnlab 1455 return current_lnlab
1440end 1456end
1441 1457
1458function ekdosis.getprevlnlab()
1459 return prev_lnlab
1460end
1461
1442function ekdosis.mdvappend(str) 1462function ekdosis.mdvappend(str)
1443 return [[\linelabel{]] .. current_lnlab .. [[-b}\wordboundary{}]] 1463 return [[\linelabel{]] .. current_lnlab .. [[-b}\wordboundary{}]]
1444 .. 1464 ..