summaryrefslogtreecommitdiffstats
path: root/config/macros.tex
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2013-03-07 00:04:56 +0100
committerDavid A. Madore <david+git@madore.org>2013-03-07 00:04:56 +0100
commit0b286fd36f2e922da623016bbd23919504e55a67 (patch)
treedc547fe88eeb84201d0c8ea6e77a20a90a3733ae /config/macros.tex
parent12c884bc91c8ea7f98df1436ebebcb29e2dafc53 (diff)
downloadgalois-0b286fd36f2e922da623016bbd23919504e55a67.tar.gz
galois-0b286fd36f2e922da623016bbd23919504e55a67.tar.bz2
galois-0b286fd36f2e922da623016bbd23919504e55a67.zip
Petit raffinement de la macro \emitmathcharsconversion-luatex
Diffstat (limited to 'config/macros.tex')
-rw-r--r--config/macros.tex14
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