diff options
-rw-r--r-- | ekdosis.dtx | 66 |
1 files changed, 28 insertions, 38 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index 1d5f998..7e44af5 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -349,6 +349,7 @@ Running "make install" installs the files in the local TeX tree. | |||
349 | \RequirePackage{luacode} | 349 | \RequirePackage{luacode} |
350 | \RequirePackage{paracol} | 350 | \RequirePackage{paracol} |
351 | \RequirePackage{options} | 351 | \RequirePackage{options} |
352 | \RequirePackage{expkv-def} | ||
352 | \RequirePackage{xparse} | 353 | \RequirePackage{xparse} |
353 | \RequirePackage{etoolbox} | 354 | \RequirePackage{etoolbox} |
354 | \RequirePackage{lineno} | 355 | \RequirePackage{lineno} |
@@ -371,35 +372,26 @@ Running "make install" installs the files in the local TeX tree. | |||
371 | % \end{macrocode} | 372 | % \end{macrocode} |
372 | % Hooks | 373 | % Hooks |
373 | % \begin{macrocode} | 374 | % \begin{macrocode} |
374 | \def\ekd@refnumstyle{\bfseries} | 375 | \ekvdefinekeys{hooks}{ |
375 | \def\ekd@postrefnum{~} | 376 | store refnumstyle = \ekd@refnumstyle, |
376 | \options{ | 377 | store postrefnum = \ekd@postrefnum, |
377 | /hooks/.new family, | 378 | initial refnumstyle = \bfseries, |
378 | /hooks/refnumstyle/.new cmd = \def\ekd@refnumstyle{#1}, | 379 | initial postrefnum = ~ |
379 | /hooks/postrefnum/.new cmd = \def\ekd@postrefnum{#1} | ||
380 | } | ||
381 | \NewDocumentCommand{\SetEkdosisHooks}{m}{ | ||
382 | \options{/hooks,#1} | ||
383 | } | 380 | } |
381 | \NewDocumentCommand{\SetEkdosisHooks}{m}{\ekvset{hooks}{#1}} | ||
384 | % \end{macrocode} | 382 | % \end{macrocode} |
385 | % Build and process the list of witnesses and hands. | 383 | % Build and process the list of witnesses and hands. |
386 | % \begin{macrocode} | 384 | % \begin{macrocode} |
387 | \options{ | 385 | \ekvdefinekeys{witness}{ |
388 | /witness/.new family, | 386 | store settlement = \settlement@value, |
389 | /witness/settlement/.new value = {}, | 387 | store repository = \repository@value, |
390 | /witness/repository/.new value = {}, | 388 | store idno = \idno@value, |
391 | /witness/idno/.new value = {}, | 389 | store msName = \msName@value, |
392 | /witness/msName/.new value = {}, | 390 | store origDate = \origDate@value |
393 | /witness/origDate/.new value = {} | ||
394 | } | 391 | } |
395 | \NewDocumentCommand{\DeclareWitness}{m m m O{}}{% | 392 | \NewDocumentCommand{\DeclareWitness}{m m m O{}}{% |
396 | \bgroup | 393 | \bgroup |
397 | \options{/witness,#4} | 394 | \ekvset{witness}{#4} |
398 | \letoption{/witness/settlement}\settlement@value | ||
399 | \letoption{/witness/repository}\repository@value | ||
400 | \letoption{/witness/idno}\idno@value | ||
401 | \letoption{/witness/msName}\msName@value | ||
402 | \letoption{/witness/origDate}\origDate@value | ||
403 | \luadirect{ekdosis.newwitness( | 395 | \luadirect{ekdosis.newwitness( |
404 | \luastringN{#1}, | 396 | \luastringN{#1}, |
405 | \luastringN{#2}, | 397 | \luastringN{#2}, |
@@ -474,29 +466,26 @@ Running "make install" installs the files in the local TeX tree. | |||
474 | % Multi-layer apparatuses | 466 | % Multi-layer apparatuses |
475 | % \begin{macrocode} | 467 | % \begin{macrocode} |
476 | \newif\ifekd@mapps | 468 | \newif\ifekd@mapps |
477 | \options{ | 469 | \ekvdefinekeys{newapp}{ |
478 | /newapp/.new family, | 470 | choice direction = {LR = \def\direction@val{LR}, |
479 | /newapp/direction/.new choice = {LR,RL}, | 471 | RL = \def\direction@val{RL}}, |
480 | /newapp/rule/.new value = {}, | 472 | store rule = \rule@val, |
481 | /newapp/delim/.new value = {}, | 473 | store delim = \delim@val, |
482 | /newapp/sep/.new value = {}, | 474 | store sep = \sep@val, |
483 | /newapp/bhook/.new value = {}, | 475 | store bhook = \bhook@val, |
484 | /newapp/ehook/.new value = {\csname ekd@end@apparatus\endcsname} | 476 | store ehook = \ehook@val, |
477 | initial direction = LR, | ||
478 | initial ehook = {\csname ekd@end@apparatus\endcsname} | ||
485 | } | 479 | } |
486 | \NewDocumentCommand{\DeclareApparatus}{m O{}}{ | 480 | \NewDocumentCommand{\DeclareApparatus}{m O{}}{ |
487 | \newbool{subsq@unit@#1} | 481 | \newbool{subsq@unit@#1} |
488 | \booltrue{subsq@unit@#1} | 482 | \booltrue{subsq@unit@#1} |
489 | \unless\ifekd@mapps\global\ekd@mappstrue\fi | 483 | \unless\ifekd@mapps\global\ekd@mappstrue\fi |
490 | \bgroup | 484 | \bgroup |
491 | \options{/newapp,#2} | 485 | \ekvset{newapp}{#2} |
492 | \letoption{/newapp/rule}\rule@val | ||
493 | \letoption{/newapp/delim}\delim@val | ||
494 | \letoption{/newapp/sep}\sep@val | ||
495 | \letoption{/newapp/bhook}\bhook@val | ||
496 | \letoption{/newapp/ehook}\ehook@val | ||
497 | \luadirect{ekdosis.newapparatus( | 486 | \luadirect{ekdosis.newapparatus( |
498 | \luastringN{#1}, | 487 | \luastringN{#1}, |
499 | \luastring{\option{/newapp/direction}}, | 488 | \luastring{\direction@val}, |
500 | \luastringO{\rule@val}, | 489 | \luastringO{\rule@val}, |
501 | \luastringO{\delim@val}, | 490 | \luastringO{\delim@val}, |
502 | \luastringO{\sep@val}, | 491 | \luastringO{\sep@val}, |
@@ -652,7 +641,8 @@ Running "make install" installs the files in the local TeX tree. | |||
652 | "pg_ii")}% | 641 | "pg_ii")}% |
653 | \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}% | 642 | \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}% |
654 | \ekd@isinappfalse} | 643 | \ekd@isinappfalse} |
655 | \def\current@ref@arg#1#2{{\textdir TLT\unexpanded\expandafter{\ekd@refnumstyle}% | 644 | \def\current@ref@arg#1#2{{\textdir TLT% |
645 | \unexpanded\expandafter{\ekd@refnumstyle}% | ||
656 | \ifnum% | 646 | \ifnum% |
657 | \getpagerefnumber{#1} | 647 | \getpagerefnumber{#1} |
658 | = | 648 | = |