From ee13476159a05039c3bac2af09f2d5858a05ff3c Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 18 Feb 2020 16:59:01 +0100 Subject: done replacing 'keycommand' with 'options' --- ekdosis.dtx | 51 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index edefb6e..05a1b00 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -346,13 +346,8 @@ Running "make install" installs the files in the local TeX tree. \else\fi\fi\fi} \ExecuteOptionsX{layout} \ProcessOptionsX\relax -\newcommand{\dontusepackage}[2][]{% - \@namedef{ver@#2.sty}{9999/12/31}% - \@namedef{opt@#2.sty}{#1}} -\dontusepackage{etex} \RequirePackage{luacode} \RequirePackage{paracol} -\RequirePackage{keycommand} \RequirePackage{options} \RequirePackage{xparse} \RequirePackage{etoolbox} @@ -995,22 +990,38 @@ Running "make install" installs the files in the local TeX tree. \egroup% \subsq@unittrue% } -\newkeycommand+[\|]{\ekd@note}[pre, post][1]{% - |\append@app|{\ifcommandkey{pre}{\commandkey{pre}}{}% - #1% - \ifcommandkey{post}{\commandkey{post}}{}}% +\options{ + /note/.new family, + /note/pre/.new value = {}, + /note/post/.new value = {} } -\newkeycommand+[\|]{\ekd@note@star}[pre, post][1]{% - |\if@pkg@parnotes|% - |\append@app|{% - \ifcommandkey{pre}{\commandkey{pre}}{}% - |\unskip\parnote|{#1}% - \ifcommandkey{post}{\commandkey{post}}{}% - }% - |\else|% - |\append@app|{% - |\unskip\footnote|{#1}}% - |\fi|% +\NewDocumentCommand{\ekd@note}{O{} m}{% + \bgroup% + \options{/note,#1}% + \letoption{/note/pre}\pre@value% + \letoption{/note/post}\post@value% + \append@app{% + \ifoptionvoid{/note/pre}{}{\pre@value}% + #2% + \ifoptionvoid{/note/post}{}{\post@value}% + } + \egroup% +} +\NewDocumentCommand{\ekd@note@star}{O{} m}{% + \if@pkg@parnotes + \bgroup% + \options{/note,#1}% + \letoption{/note/pre}\pre@value% + \letoption{/note/post}\post@value% + \append@app{% + \ifoptionvoid{/note/pre}{}{\pre@value}% + \unskip\parnote{#2}% + \ifoptionvoid{/note/post}{}{\post@value}% + } + \egroup% + \else + \append@app{\unskip\footnote{#2}}% + \fi% } \NewDocumentCommand{\note@app}{s O{} +m}{% \ifbool{al@rlmode}{% -- cgit v1.2.3