From a1be1b3fa2bc6910e7eb3f55da4627f80675b67e Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 17 Nov 2019 19:01:59 +0100 Subject: added new option 'sep' in \DeclareApparatus; new variable CMP in Makefile --- Makefile | 9 +++++---- ekdosis.dtx | 10 +++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6449ff6..e4e89a2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ NAME = ekdosis SHELL = bash +CMP = lualatex-dev PWD = $(shell pwd) VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) @@ -7,11 +8,11 @@ UTREE = $(shell kpsewhich --var-value TEXMFHOME) all: $(NAME).pdf test -e README.txt && mv README.txt README || exit 0 $(NAME).pdf: $(NAME).dtx - lualatex --shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null + $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi - lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null - lualatex --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null + $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null + $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null clean: rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,pyg} rm -f *~ @@ -30,7 +31,7 @@ inst: uninst all cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME) local: uninst - lualatex $(NAME).ins + $(CMP) $(NAME).ins mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) diff --git a/ekdosis.dtx b/ekdosis.dtx index 640b91d..7275754 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -454,7 +454,7 @@ idno={}, msName={}, origDate={}][3]{% % \begin{macrocode} \newif\ifekd@mapps \newkeycommand+[\|]{\declare@apparatus}[enum direction={LR,RL}, rule={}, - delim={}, bhook={}, + delim={}, sep={}, bhook={}, ehook={\csname ekd@end@apparatus\endcsname}][1]{% |\luadirect|{% ekdosis.newapparatus( @@ -462,6 +462,7 @@ idno={}, msName={}, origDate={}][3]{% |\luastringN|{\commandkey{direction}}, |\luastringN|{\commandkey{rule}}, |\luastringN|{\commandkey{delim}}, + |\luastringN|{\commandkey{sep}}, |\luastringN|{\commandkey{bhook}}, |\luastringN|{\commandkey{ehook}})} } @@ -1853,6 +1854,7 @@ function ekdosis.newapparatus(teitype, appdir, apprule, appdelim, + appsep, appbhook, appehook) if isintable(apparatuses, teitype) @@ -1865,6 +1867,7 @@ function ekdosis.newapparatus(teitype, direction = appdir, rule = apprule, delim = appdelim, + sep = appsep, bhook = appbhook, ehook = appehook}) end @@ -1974,6 +1977,11 @@ function ekdosis.appout() table.insert(output, "\\csname ekd@default@rule\\endcsname\\NLS\\noindent ") end end + if apparatuses[n].sep ~= "" + then + table.insert(output, "\\edef\\ekdsep{" .. apparatuses[n].sep .. "}") + else + end if apparatuses[n].bhook ~= "" then table.insert(output, apparatuses[n].bhook) -- cgit v1.2.3