diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-12-14 13:34:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-12-14 13:34:00 +0100 |
commit | af6afe18f5ac2f2474044f44413924ac4ae9800d (patch) | |
tree | 3ee200d6b21083f0ea1b194277fa73394d1eccf4 /tex/context/base/char-tex.lua | |
parent | c651d2abf2b613fe3ac390932bceb65f9358e304 (diff) | |
download | context-af6afe18f5ac2f2474044f44413924ac4ae9800d.tar.gz |
beta 2013.12.14 13:34
Diffstat (limited to 'tex/context/base/char-tex.lua')
-rw-r--r-- | tex/context/base/char-tex.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tex/context/base/char-tex.lua b/tex/context/base/char-tex.lua index 91aa387b9..4c397ab3b 100644 --- a/tex/context/base/char-tex.lua +++ b/tex/context/base/char-tex.lua @@ -164,7 +164,8 @@ local function remap_accents(a,c,braced) end local command_map = allocate { - ["i"] = "ı" + ["i"] = "ı", + ["l"] = "ł", } local function remap_commands(c) @@ -176,8 +177,9 @@ local function remap_commands(c) end end -local accents = (P('\\') * C(S(accents)) * (P("{") * C(U) * P("}" * Cc(true)) + C(U) * Cc(false))) / remap_accents -local commands = (P('\\') * C(R("az","AZ")^1)) / remap_commands +local spaces = P(" ")^0 +local accents = ( P('\\') * C(S(accents)) * spaces * (P("{") * C(U) * P("}" * Cc(true)) + C(U) * Cc(false)) ) / remap_accents +local commands = ( P('\\') * C(R("az","AZ")^1) + P("{") * P('\\') * C(R("az","AZ")^1) * spaces * P("}") )/ remap_commands local convert_accents = Cs((accents + P(1))^0) local convert_commands = Cs((commands + P(1))^0) @@ -198,8 +200,12 @@ function characters.tex.toutf(str,strip) end end ---~ print(characters.tex.toutf([[\"{e}]]),true) ---~ print(characters.tex.toutf([[{\"{e}}]],true)) +-- print(characters.tex.toutf([[\"{e}]],true)) +-- print(characters.tex.toutf([[\" {e}]],true)) +-- print(characters.tex.toutf([[{\"{e}}]],true)) +-- print(characters.tex.toutf([[{\" {e}}]],true)) +-- print(characters.tex.toutf([[{\l}]],true)) +-- print(characters.tex.toutf([[{\l }]],true)) function characters.tex.defineaccents() for accent, group in next, accentmapping do |