From c67d7a0463454d62d3d2a5f10cc38699f8e18e66 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Tue, 18 Feb 2020 14:07:56 +0100
Subject: more careful expansion control

---
 ekdosis.dtx | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index f377803..edefb6e 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -393,15 +393,20 @@ Running "make install" installs the files in the local TeX tree.
       )}}
   {\bgroup
     \options{/witness,#4}
+    \letoption{/witness/settlement}\settlement@value
+    \letoption{/witness/repository}\repository@value
+    \letoption{/witness/idno}\idno@value
+    \letoption{/witness/msName}\msName@value
+    \letoption{/witness/origDate}\origDate@value
     \luadirect{ekdosis.newwitness(
       \luastringN{#1},
       \luastringN{#2},
       \luastringN{#3},
-      \luastring{\option{/witness/settlement}},
-      \luastring{\option{/witness/repository}},
-      \luastring{\option{/witness/idno}},
-      \luastring{\option{/witness/msName}},
-      \luastring{\option{/witness/origDate}}
+      \luastringO{\settlement@value},
+      \luastringO{\repository@value},
+      \luastringO{\idno@value},
+      \luastringO{\msName@value},
+      \luastringO{\origDate@value}
       )}
     \egroup}
 }
@@ -483,14 +488,19 @@ Running "make install" installs the files in the local TeX tree.
   \unless\ifekd@mapps\global\ekd@mappstrue\fi
   \bgroup
   \options{/newapp,#2}
+  \letoption{/newapp/rule}\rule@val
+  \letoption{/newapp/delim}\delim@val
+  \letoption{/newapp/sep}\sep@val
+  \letoption{/newapp/bhook}\bhook@val
+  \letoption{/newapp/ehook}\ehook@val
   \luadirect{ekdosis.newapparatus(
     \luastringN{#1},
     \luastring{\option{/newapp/direction}},
-    \luastring{\option{/newapp/rule}},
-    \luastring{\option{/newapp/delim}},
-    \luastring{\option{/newapp/sep}},
-    \luastring{\option{/newapp/bhook}},
-    \luastring{\option{/newapp/ehook}}
+    \luastringO{\rule@val},
+    \luastringO{\delim@val},
+    \luastringO{\sep@val},
+    \luastringO{\bhook@val},
+    \luastringO{\ehook@val}
     )}
   \egroup
 }
-- 
cgit v1.2.3

