From 29b9b2909973d24b37836a2339ec435db3c0846c Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sat, 26 Oct 2019 15:26:10 +0200
Subject: process commands without mandatory argument through cmdtotei()

---
 ekdosis.dtx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index d5c6bd5..a7a6dac 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -577,7 +577,7 @@ idno={}, msName={}, origDate={}][3]{%
   \egroup%
   \fi%
   \if@pkg@float%
-  \keyparbox[b!]{}{\ifrtl@app\setRL\fi%
+  \keyparbox[!b]{}{\ifrtl@app\setRL\fi%
     \if@pkg@parnotes%
     \if@parnotesroman%
     \renewcommand*{\theparnotemark}{\roman{parnotemark}}\else\fi%
@@ -1541,6 +1541,8 @@ end
 local function cmdtotei(str)
    for i = 1,#cmdtotags
    do
+      str = gsub(str, lpeg.P("\\") * lpeg.Cs(cmdtotags[i].a) * spcenc^-1 * bsqbrackets * -bcbraces, "\\%1%2{}")
+      str = gsub(str, lpeg.P("\\") * lpeg.Cs(cmdtotags[i].a) * spcenc^-1 * -(bsqbrackets + bcbraces), "\\%1[]{}")
       str = string.gsub(str, "(\\"..cmdtotags[i].a..")%s?%*?(%b{})", "%1[]%2")
       str = string.gsub(str, "(\\"..cmdtotags[i].a..")%s?%*?(%b[])(%b{})",
 			function(cmd, arg, body)
-- 
cgit v1.2.3

