aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ekdosis.dtx36
1 files changed, 12 insertions, 24 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index febab2c..df443ab 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -347,8 +347,6 @@ Running "make install" installs the files in the local TeX tree.
347\newbool{ekdstarted} 347\newbool{ekdstarted}
348\newbool{doapp} 348\newbool{doapp}
349\newbool{ekdstate} 349\newbool{ekdstate}
350\newif\ifinapp
351\newif\ifnonote
352\providebool{al@rlmode} 350\providebool{al@rlmode}
353\newcounter{ekd@lab} 351\newcounter{ekd@lab}
354\def\blfootnote{\gdef\@thefnmark{\relax}\@footnotetext} 352\def\blfootnote{\gdef\@thefnmark{\relax}\@footnotetext}
@@ -388,26 +386,25 @@ Running "make install" installs the files in the local TeX tree.
388 ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, 386 ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}},
389 "pg_ii")}% 387 "pg_ii")}%
390 \ifbool{ekdstate}{\add@apparatus}{}% 388 \ifbool{ekdstate}{\add@apparatus}{}%
391 \bgroup\inapptrue#1\egroup} 389 #1}
392\NewDocumentCommand{\noteonly}{+m}{ 390\newkeycommand+[\|]{\lem}[wit,alt,post,pre][1]{%
393 \luadirect{tex.sprint(ekdosis.ntonly(\luastringN{#1}))} 391 #1%
394}
395\newkeycommand+[\|]{\lem}[wit,alt][1]{%
396 |\nonotetrue|#1%
397 |\nonotefalse|%
398 \bgroup%
399 |\inappfalse|%
400 |\ifbool{al@rlmode}|% 392 |\ifbool{al@rlmode}|%
401 {|\obappend|{% 393 {|\obappend|{%
402 \bgroup% 394 \bgroup%
403 |\setRL|\ifcommandkey{alt}{\commandkey{alt}% 395 |\setRL|\ifcommandkey{alt}{\commandkey{alt}%
404 \noteonly{#1}}{#1}% 396 \ifcommandkey{pre}{ \commandkey{pre} }{}%
397 }{#1%
398 \ifcommandkey{pre}{ \commandkey{pre} }{}%
399 }%
405 \egroup{}% 400 \egroup{}%
406 \ifcommandkey{wit}{ \commandkey{wit}}{}:}}% 401 \ifcommandkey{wit}{ \commandkey{wit}}{}:}}%
407 {|\obappend|{\ifcommandkey{alt}{\commandkey{alt}% 402 {|\obappend|{\ifcommandkey{alt}{\commandkey{alt}%
408 \noteonly{#1}}{#1}% 403 \ifcommandkey{post}{ \commandkey{post} }{}%
404 }{#1%
405 \ifcommandkey{post}{ \commandkey{post} }{}%
406 }%
409 \ifcommandkey{wit}{ \commandkey{wit}}{}:}}% 407 \ifcommandkey{wit}{ \commandkey{wit}}{}:}}%
410 \egroup{}%
411} 408}
412 % \NewDocumentCommand{\lem}{o +m}{\nonotetrue#2% 409 % \NewDocumentCommand{\lem}{o +m}{\nonotetrue#2%
413 % \nonotefalse\bgroup\inappfalse% 410 % \nonotefalse\bgroup\inappfalse%
@@ -419,7 +416,7 @@ Running "make install" installs the files in the local TeX tree.
419 % \egroup% 416 % \egroup%
420 % } 417 % }
421\NewDocumentCommand{\rdg}{o +m}{% 418\NewDocumentCommand{\rdg}{o +m}{%
422 \bgroup\inappfalse% 419 \bgroup%
423 \ifbool{al@rlmode}% 420 \ifbool{al@rlmode}%
424 {\IfNoValueTF{#1} 421 {\IfNoValueTF{#1}
425 {\append{\bgroup\setRL#2\egroup}} 422 {\append{\bgroup\setRL#2\egroup}}
@@ -428,16 +425,12 @@ Running "make install" installs the files in the local TeX tree.
428 \egroup% 425 \egroup%
429} 426}
430\NewDocumentCommand{\note}{s +m}{% 427\NewDocumentCommand{\note}{s +m}{%
431 \ifnonote\else%
432 \ifinapp%
433 \IfBooleanTF{#1}{% 428 \IfBooleanTF{#1}{%
434 \if@pkg@parnotes\append{\parnote{#2}}% 429 \if@pkg@parnotes\append{\parnote{#2}}%
435 \else\append{\footnote{#2}}\fi}{\append{#2}}% 430 \else\append{\footnote{#2}}\fi}{\append{#2}}%
436 \else%
437 \IfBooleanTF{#1}{% 431 \IfBooleanTF{#1}{%
438 \if@pkg@parnotes\parnote{#2}% 432 \if@pkg@parnotes\parnote{#2}%
439 \else\footnote{#2}\fi}{ #2\xspace}% 433 \else\footnote{#2}\fi}{ #2\xspace}%
440 \fi\fi%
441} 434}
442\NewDocumentCommand{\apparatus}{}{\luadirect{tex.sprint(appout())}} 435\NewDocumentCommand{\apparatus}{}{\luadirect{tex.sprint(appout())}}
443\NewDocumentCommand{\testapparatus}{}{% 436\NewDocumentCommand{\testapparatus}{}{%
@@ -517,11 +510,6 @@ function isintable(table, value)
517 return false 510 return false
518end 511end
519 512
520ekdosis.ntonly = function(str)
521 str = string.match(str, "\\note%s?%*?%b{}")
522 return str or ""
523end
524
525function appin(str, nl) 513function appin(str, nl)
526 local f = io.open(tex.jobname.."_tmp.ekd", "a+") 514 local f = io.open(tex.jobname.."_tmp.ekd", "a+")
527 if nl == "yes" then 515 if nl == "yes" then