aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2019-08-24 13:06:54 +0200
committerRobert Alessi <alessi@robertalessi.net>2019-08-24 13:06:54 +0200
commit23bc528c89e84c5caa540d030b6591dca963184f (patch)
treed3b52c3221ff6e2313ab0e97422caa22eb1d6efa
parentd73b63477b7d618ad0abe2ae6a11c61f8c4c9ec1 (diff)
downloadekdosis-23bc528c89e84c5caa540d030b6591dca963184f.tar.gz
done rewriting \lem
-rw-r--r--ekdosis.dtx59
1 files changed, 40 insertions, 19 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 0f08c82..afacb0c 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -456,7 +456,7 @@ idno={}, msName={}, origDate={}][3]{%
456\newif\ifekd@isinapp 456\newif\ifekd@isinapp
457\providebool{al@rlmode} 457\providebool{al@rlmode}
458\@ifpackageloaded{arabluatex}{}{% 458\@ifpackageloaded{arabluatex}{}{%
459 \def\setRL{\booltrue{al@rlmode} \pardir TRT \textdir TRT}} 459 \def\setRL{\booltrue{al@rlmode}\pardir TRT\textdir TRT}}
460\newcounter{ekd@lab} 460\newcounter{ekd@lab}
461\def\unconditional@appin#1{% 461\def\unconditional@appin#1{%
462 \luadirect{ekdosis.appin( 462 \luadirect{ekdosis.appin(
@@ -514,30 +514,51 @@ idno={}, msName={}, origDate={}][3]{%
514\NewDocumentCommand{\SetSeparator}{m}{\edef\ekdsep{#1}} 514\NewDocumentCommand{\SetSeparator}{m}{\edef\ekdsep{#1}}
515\define@cmdkeys[ekd]{lemrdg}[ekdlr@]{wit, alt, pre, post, prewit, 515\define@cmdkeys[ekd]{lemrdg}[ekdlr@]{wit, alt, pre, post, prewit,
516 postwit} 516 postwit}
517\define@cmdkey[ekd]{lem}[ekdl@]{sep}[\ekdsep]{#1} 517\define@cmdkey[ekd]{lem}[ekdl@]{sep}{}
518\presetkeys[ekd]{lem}{sep=\ekdsep}{}
518\define@boolkeys[ekd]{lem}[ekdl@]{nolem, nosep}[true] 519\define@boolkeys[ekd]{lem}[ekdl@]{nolem, nosep}[true]
519\NewDocumentCommand{\lem}{O{} m}{% 520\NewDocumentCommand{\lem}{O{} m}{%
520 #2% 521 #2%
522 \bgroup%
521 \setkeys[ekd]{lemrdg,lem}{#1}% 523 \setkeys[ekd]{lemrdg,lem}{#1}%
522 \ifekdl@nolem\append@ln@app{}\else% 524 \ifekdl@nolem\append@ln@app{}\else%
523 % 525 \ifbool{al@rlmode}{%
524 \edef\lem@app{% 526 \edef\lem@app{%
525 \ifdefined\ekdlr@alt 527 \ifdefined\ekdlr@alt
526 \ifdefined\ekdlr@pre\ekdlr@pre\else\fi 528 \ifdefined\ekdlr@post\space\ekdlr@post\space\else\fi
527 \ekdlr@alt 529 {\textdir TRT\ekdlr@alt}
528 \ifdefined\ekdlr@post\ekdlr@post\else\fi 530 \ifdefined\ekdlr@pre\space\ekdlr@pre\space\else\fi
529 \else 531 \else
530 \ifdefined\ekdlr@pre\ekdlr@pre\else\fi 532 \ifdefined\ekdlr@post\space\ekdlr@post\space\else\fi
531 #2 533 {\textdir TRT#2}%
532 \ifdefined\ekdlr@post\ekdlr@post\else\fi 534 \ifdefined\ekdlr@pre\space\ekdlr@pre\space\else\fi
533 \fi 535 \fi
534 \ifdefined\ekdlr@prewit\ekdlr@prewit\else\fi 536 \ifdefined\ekdlr@postwit\space\ekdlr@postwit\else\fi
535 \ifdefined\ekdlr@wit\getsiglum{\ekdlr@wit}\else\fi 537 \ifdefined\ekdlr@wit\space\getsiglum{\ekdlr@wit}\else\fi
536 \ifdefined\ekdlr@postwit\ekdlr@postwit\else\fi 538 \ifdefined\ekdlr@prewit\space\ekdlr@prewit\space\else\fi
537 %\ekdl@sep 539 \ifekdl@nosep\else\ekdl@sep\fi
538 } 540 }%
539 \append@ln@app{\lem@app} 541 }%
542 {%
543 \edef\lem@app{%
544 \ifdefined\ekdlr@alt
545 \ifdefined\ekdlr@pre\space\ekdlr@pre\space\else\fi
546 \ekdlr@alt
547 \ifdefined\ekdlr@post\space\ekdlr@post\space\else\fi
548 \else
549 \ifdefined\ekdlr@pre\space\ekdlr@pre\space\else\fi
550 #2%
551 \ifdefined\ekdlr@post\space\ekdlr@post\space\else\fi
552 \fi
553 \ifdefined\ekdlr@prewit\space\ekdlr@prewit\space\else\fi
554 \ifdefined\ekdlr@wit\space\getsiglum{\ekdlr@wit}\else\fi
555 \ifdefined\ekdlr@postwit\space\ekdlr@postwit\else\fi
556 \ifekdl@nosep\else\ekdl@sep\fi
557 }%
558 }%
559 \append@ln@app{\lem@app}%
540 \fi% 560 \fi%
561 \egroup%
541} 562}
542\newkeycommand+[\|]{\lemout}[wit, alt, pre, post, prewit, postwit, 563\newkeycommand+[\|]{\lemout}[wit, alt, pre, post, prewit, postwit,
543sep={\ekdsep}, choice nosep={false,,true}, 564sep={\ekdsep}, choice nosep={false,,true},