From e7bc24917c1334d4f5ec1dcdcf1730d7867c8a48 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 19 Nov 2018 17:27:25 +0100 Subject: made internal commands inaccessible --- ekdosis.dtx | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'ekdosis.dtx') diff --git a/ekdosis.dtx b/ekdosis.dtx index 858f1a3..86f066c 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -344,9 +344,9 @@ Running "make install" installs the files in the local TeX tree. \AtEndDocument{\luadirect{closestream()}} % \end{macrocode} % \begin{macrocode} -\newbool{ekdstarted} -\newbool{doapp} -\newbool{ekdstate} +\newbool{ekd@started} +\newbool{do@app} +\newbool{ekd@state} \providebool{al@rlmode} \newcounter{ekd@lab} \def\blfootnote{\gdef\@thefnmark{\relax}\@footnotetext} @@ -364,20 +364,20 @@ Running "make install" installs the files in the local TeX tree. }% } \def\add@apparatus{% - \notbool{ekdstarted}{\add@@apparatus% - \global\setbool{ekdstarted}{true}} - {\testapparatus% - \ifbool{doapp}{\add@@apparatus}{}}% + \notbool{ekd@started}{\add@@apparatus% + \global\setbool{ekd@started}{true}} + {\text@apparatus% + \ifbool{do@app}{\add@@apparatus}{}}% } -\NewDocumentCommand{\append}{+m}{% - \ifbool{ekdstate}{% +\NewDocumentCommand{\append@app}{+m}{% + \ifbool{ekd@state}{% \luadirect{appin(\luastring{<\zref@extract{ekd:\theekd@lab}{abspage}>}, "no")}% \luadirect{appin(\luastringN{#1}, "no")}% \luadirect{appin(\luastring{}, "yes")}% }{}} -\NewDocumentCommand{\obappend}{+m}% +\NewDocumentCommand{\append@ln@app}{+m}% {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringN{#1}))}} \NewDocumentCommand{\app}{+m}{% \stepcounter{ekd@lab}% @@ -385,12 +385,12 @@ Running "make install" installs the files in the local TeX tree. \luadirect{% ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, "pg_ii")}% - \ifbool{ekdstate}{\add@apparatus}{}% + \ifbool{ekd@state}{\add@apparatus}{}% #1} \newkeycommand+[\|]{\lem}[wit, alt, pre, post, prewit, postwit][1]{% #1% |\ifbool{al@rlmode}|% - {|\obappend|{% + {|\append@ln@app|{% \bgroup% |\setRL|% \ifcommandkey{alt}{% @@ -407,7 +407,7 @@ Running "make install" installs the files in the local TeX tree. \ifcommandkey{wit}{ \commandkey{wit}}{}% \ifcommandkey{postwit}{ \commandkey{postwit}}{}:% }}% - {|\obappend|{% + {|\append@ln@app|{% \ifcommandkey{alt}{% \ifcommandkey{pre}{ \commandkey{pre} }{}% \commandkey{alt}% @@ -424,7 +424,7 @@ Running "make install" installs the files in the local TeX tree. } \newkeycommand+[\|]{\rdg}[wit, alt, pre, post, prewit, postwit][1]{% |\ifbool{al@rlmode}|% - {|\append|{% + {|\append@app|{% \bgroup% |\setRL|% \ifcommandkey{alt}{% @@ -441,7 +441,7 @@ Running "make install" installs the files in the local TeX tree. \ifcommandkey{wit}{ \commandkey{wit}}{}% \ifcommandkey{postwit}{ \commandkey{postwit}}{}% }}% - {|\append|{% + {|\append@app|{% \ifcommandkey{alt}{% \ifcommandkey{pre}{ \commandkey{pre} }{}% \commandkey{alt}% @@ -458,14 +458,14 @@ Running "make install" installs the files in the local TeX tree. } \NewDocumentCommand{\note}{s +m}{% \IfBooleanTF{#1}{% - \if@pkg@parnotes\append{\parnote{#2}}% - \else\append{\footnote{#2}}\fi}{\append{#2}}% + \if@pkg@parnotes\append@app{\parnote{#2}}% + \else\append@app{\footnote{#2}}\fi}{\append@app{#2}}% \IfBooleanTF{#1}{% \if@pkg@parnotes\parnote{#2}% \else\footnote{#2}\fi}{ #2\xspace}% } \NewDocumentCommand{\apparatus}{}{\luadirect{tex.sprint(appout())}} -\NewDocumentCommand{\testapparatus}{}{% +\NewDocumentCommand{\text@apparatus}{}{% \luadirect{tex.sprint(ekdosis.testapparatus())}} \NewDocumentCommand{\EkdosisStart}{}{% \stepcounter{ekd@lab}% @@ -474,9 +474,9 @@ Running "make install" installs the files in the local TeX tree. ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, "pg_i")}% } -\NewDocumentCommand{\EkdosisOn}{}{\setbool{ekdstate}{true}} +\NewDocumentCommand{\EkdosisOn}{}{\setbool{ekd@state}{true}} \NewDocumentCommand{\EkdosisOff}{}{% - \setbool{ekdstate}{false}% + \setbool{ekd@state}{false}% } \newenvironment{ekdosis}{% \EkdosisStart% @@ -574,12 +574,12 @@ end ekdosis.testapparatus = function() if pg_ii == pg_i then - return "\\boolfalse{doapp}" + return "\\boolfalse{do@app}" elseif pg_ii > pg_i then pg_i = pg_ii - return "\\booltrue{doapp}" + return "\\booltrue{do@app}" else - return "\\boolfalse{doapp}" + return "\\boolfalse{do@app}" end end @@ -597,7 +597,7 @@ ekdosis.mdvappend = function(str) end return "\\linelabel{"..i.."}" .. - "\\append{\\textbf{\\getrefnumber{"..i.."}} "..str.."}" + "\\csname append@app\\endcsname{\\textbf{\\getrefnumber{"..i.."}} "..str.."}" end % \end{ekdlua} -- cgit v1.2.3