diff options
author | David A. Madore <david+git@madore.org> | 2013-03-07 00:04:56 +0100 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2013-03-07 00:04:56 +0100 |
commit | 0b286fd36f2e922da623016bbd23919504e55a67 (patch) | |
tree | dc547fe88eeb84201d0c8ea6e77a20a90a3733ae | |
parent | 12c884bc91c8ea7f98df1436ebebcb29e2dafc53 (diff) | |
download | galois-conversion-luatex.tar.gz galois-conversion-luatex.tar.bz2 galois-conversion-luatex.zip |
Petit raffinement de la macro \emitmathcharsconversion-luatex
-rw-r--r-- | config/macros.tex | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/config/macros.tex b/config/macros.tex index 8d0591a..561a15c 100644 --- a/config/macros.tex +++ b/config/macros.tex @@ -17,14 +17,22 @@ function dmadore.process_chars(consumer) elseif t[1]==2 then % Accolade fermante nesting = nesting-1 if nesting>0 then consumer(t[2]) end - elseif t[1]>=3 and t[1]<=15 then + elseif t[1]>=3 and t[1]<=15 then % La plupart des caractères consumer(t[2]) elseif token.is_activechar(t) then % Caractère actif for v in string.utfvalues(token.csname_name(t)) do consumer(v) end - else - tex.error("I didn't expect a control sequence here") + else % Commande + do + local name_iter = string.utfvalues(token.csname_name(t)) + local v = name_iter() + if v == nil or not (name_iter() == nil) then + tex.error("I didn't expect a control sequence here") + else + consumer(v) + end + end end until nesting==0 end |