From bd04fcc37940e954de06c50ed6d23de186662891 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 17 Feb 2020 23:36:50 +0100 Subject: replacing 'keycommand' with 'options' (2/3) --- ekdosis.dtx | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'ekdosis.dtx') diff --git a/ekdosis.dtx b/ekdosis.dtx index fcb66bd..f377803 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -468,24 +468,31 @@ Running "make install" installs the files in the local TeX tree. % Multi-layer apparatuses % \begin{macrocode} \newif\ifekd@mapps -\newkeycommand+[\|]{\declare@apparatus}[enum direction={LR,RL}, rule={}, - delim={}, sep={}, bhook={}, - ehook={\csname ekd@end@apparatus\endcsname}][1]{% - |\luadirect|{% - ekdosis.newapparatus( - |\luastringN|{#1}, - |\luastringN|{\commandkey{direction}}, - |\luastringN|{\commandkey{rule}}, - |\luastringN|{\commandkey{delim}}, - |\luastringN|{\commandkey{sep}}, - |\luastringN|{\commandkey{bhook}}, - |\luastringN|{\commandkey{ehook}})} +\options{ + /newapp/.new family, + /newapp/direction/.new choice = {LR,RL}, + /newapp/rule/.new value = {}, + /newapp/delim/.new value = {}, + /newapp/sep/.new value = {}, + /newapp/bhook/.new value = {}, + /newapp/ehook/.new value = {\csname ekd@end@apparatus\endcsname} } \NewDocumentCommand{\DeclareApparatus}{m O{}}{ \newbool{subsq@unit@#1} \booltrue{subsq@unit@#1} \unless\ifekd@mapps\global\ekd@mappstrue\fi - \declare@apparatus[#2]{#1} + \bgroup + \options{/newapp,#2} + \luadirect{ekdosis.newapparatus( + \luastringN{#1}, + \luastring{\option{/newapp/direction}}, + \luastring{\option{/newapp/rule}}, + \luastring{\option{/newapp/delim}}, + \luastring{\option{/newapp/sep}}, + \luastring{\option{/newapp/bhook}}, + \luastring{\option{/newapp/ehook}} + )} + \egroup } \@onlypreamble\DeclareApparatus % \end{macrocode} @@ -578,7 +585,7 @@ Running "make install" installs the files in the local TeX tree. \if@pkg@parnotes\parnotes\else\fi% \if@pkg@footins% \bgroup% - \ifrtl@app\setRL\fi% + \ifrtl@app\setRL\else\setLR\fi% \blfootnote{% \if@pkg@parnotes% \if@parnotesroman% @@ -590,7 +597,7 @@ Running "make install" installs the files in the local TeX tree. \egroup% \fi% \if@pkg@float% - \keyparbox[!b]{}{\ifrtl@app\setRL\fi% + \keyparbox[!b]{}{\ifrtl@app\setRL\else\setLR\fi% \if@pkg@parnotes% \if@parnotesroman% \renewcommand*{\theparnotemark}{\roman{parnotemark}}\else\fi% -- cgit v1.2.3