aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2019-04-11 12:13:23 +0200
committerRobert Alessi <alessi@robertalessi.net>2019-04-11 12:13:23 +0200
commitaeae43d3534cf925e45e99e9abe0b0e365a73595 (patch)
tree9d07b79c1b1a417b99e38c428b54365114ae2860
parent04c2290b7aab466cbcfbfdf4fb660f8aa0121883 (diff)
downloadekdosis-aeae43d3534cf925e45e99e9abe0b0e365a73595.tar.gz
new command \SetSeparator. \lem{}: new options 'nosep' 'sep' (need more work)
-rw-r--r--ekdosis.dtx20
1 files changed, 17 insertions, 3 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 37fab9d..7bfc0f5 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -482,8 +482,11 @@ idno={}, msName={}, origDate={}][3]{%
482 \ifbool{ekd@state}{\add@apparatus}{}% 482 \ifbool{ekd@state}{\add@apparatus}{}%
483 \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#1}))}% 483 \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#1}))}%
484 \ekd@isinappfalse} 484 \ekd@isinappfalse}
485\edef\@sep{: }
486\NewDocumentCommand{\SetSeparator}{m}{\edef\@sep{#1}}
485\newkeycommand+[\|]{\lem}[wit, alt, pre, post, prewit, postwit, 487\newkeycommand+[\|]{\lem}[wit, alt, pre, post, prewit, postwit,
486choice nolem={false,,true}][1]{% 488sep={\csname @sep\endcsname},
489choice nosep={false,,true}, choice nolem={false,,true}][1]{%
487 #1% 490 #1%
488 |\ifnum|% 491 |\ifnum|%
489 \commandkey{nolem}>0% 492 \commandkey{nolem}>0%
@@ -505,7 +508,12 @@ choice nolem={false,,true}][1]{%
505 \egroup{}% 508 \egroup{}%
506 \ifcommandkey{prewit}{ \commandkey{prewit} }{}% 509 \ifcommandkey{prewit}{ \commandkey{prewit} }{}%
507 \ifcommandkey{wit}{ \getsiglum{\commandkey{wit}}}{}% 510 \ifcommandkey{wit}{ \getsiglum{\commandkey{wit}}}{}%
508 \ifcommandkey{postwit}{ \commandkey{postwit}}{}:% 511 \ifcommandkey{postwit}{ \commandkey{postwit}}{}%
512 |\ifnum|
513 \commandkey{nosep}>0%
514 |\else|
515 \commandkey{sep}%
516 |\fi|%
509 }}% 517 }}%
510 {\append@ln@app{% 518 {\append@ln@app{%
511 \ifcommandkey{alt}{% 519 \ifcommandkey{alt}{%
@@ -519,7 +527,12 @@ choice nolem={false,,true}][1]{%
519 }% 527 }%
520 \ifcommandkey{prewit}{ \commandkey{prewit} }{}% 528 \ifcommandkey{prewit}{ \commandkey{prewit} }{}%
521 \ifcommandkey{wit}{ \getsiglum{\commandkey{wit}}}{}% 529 \ifcommandkey{wit}{ \getsiglum{\commandkey{wit}}}{}%
522 \ifcommandkey{postwit}{ \commandkey{postwit}}{}:% 530 \ifcommandkey{postwit}{ \commandkey{postwit}}{}%
531 |\ifnum|
532 \commandkey{nosep}>0%
533 |\else|
534 \commandkey{sep}%
535 |\fi|%
523 }}% 536 }}%
524 |\fi|} 537 |\fi|}
525\newkeycommand+[\|]{\rdg}[wit, alt, pre, post, prewit, postwit][1]{% 538\newkeycommand+[\|]{\rdg}[wit, alt, pre, post, prewit, postwit][1]{%
@@ -832,6 +845,7 @@ end
832function ekdosis.textotei(str) 845function ekdosis.textotei(str)
833 str = xml_entities(str) 846 str = xml_entities(str)
834 str = string.gsub(str, "%s?\\par%s?", "</p>\n<p>") 847 str = string.gsub(str, "%s?\\par%s?", "</p>\n<p>")
848 str = string.gsub(str, "%s?\\unskip%s?", "")
835 str = lem_rdg_totei(str) 849 str = lem_rdg_totei(str)
836 str = textotei(str) 850 str = textotei(str)
837 return str 851 return str