From 8776b6904301f706580b6078193a145e9c882b5e Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 19 Apr 2019 12:12:48 +0200 Subject: added 'pre' and 'post' options to \note --- ekdosis.dtx | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'ekdosis.dtx') diff --git a/ekdosis.dtx b/ekdosis.dtx index 983ead7..ff1a81f 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -566,13 +566,29 @@ choice nosep={false,,true}, choice nolem={false,,true}][1]{% }% \ifcommandkey{prewit}{ \commandkey{prewit} }{}% \ifcommandkey{wit}{ \getsiglum{\commandkey{wit}}}{}% - \ifcommandkey{postwit}{ \commandkey{postwit}}{}% + \ifcommandkey{postwit}{ \commandkey{postwit}\unskip}{\unskip}% }}% } -\NewDocumentCommand{\note}{s +m}{% - \IfBooleanTF{#1}{% - \if@pkg@parnotes\append@app{\parnote{#2}}% - \else\append@app{\footnote{#2}}\fi}{\append@app{#2}}% +\newkeycommand+[\|]{\ekd@note}[pre, post][1]{% + \append@app{\ifcommandkey{pre}{\commandkey{pre}}{}% + #1% + \ifcommandkey{post}{\commandkey{post}}{}}% +} +\newkeycommand+[\|]{\ekd@note@star}[pre, post][1]{% + |\if@pkg@parnotes|% + \append@app{% + \ifcommandkey{pre}{\commandkey{pre}}{}% + |\parnote|{#1}% + \ifcommandkey{post}{\commandkey{post}}{}% + }% + |\else|% + \append@app{% + |\footnote|{#1}} + |\fi|% +} +\NewDocumentCommand{\note}{s O{} +m}{% + \IfBooleanTF{#1}{\ekd@note@star[#2]{#3}} + {\ekd@note[#2]{#3}}% } \NewDocumentCommand{\apparatus}{}{\luadirect{tex.sprint(ekdosis.appout())}} \NewDocumentCommand{\test@apparatus}{}{% -- cgit v1.2.3