diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
commit | fc4466b32ed330a956ac603b00fd145524cff49a (patch) | |
tree | 2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base/spac-hor.lua | |
parent | 50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff) |
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/spac-hor.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/spac-hor.lua | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/context/base/spac-hor.lua b/Master/texmf-dist/tex/context/base/spac-hor.lua deleted file mode 100644 index 5d5a43e311c..00000000000 --- a/Master/texmf-dist/tex/context/base/spac-hor.lua +++ /dev/null @@ -1,44 +0,0 @@ -if not modules then modules = { } end modules ['spac-hor'] = { - version = 1.001, - comment = "companion to spac-hor.mkiv", - author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "see context related readme files" -} - -local utfbyte = utf.byte -local lpegmatch, P, C = lpeg.match, lpeg.P, lpeg.C - -local context = context - -local chardata = characters.data - -local p_check = P("the ") * (P("letter") + P("character")) * P(" ") * lpeg.patterns.utf8byte -- is a capture already - -local can_have_space = table.tohash { - "lu", "ll", "lt", "lm", "lo", -- letters - -- "mn", "mc", "me", -- marks - "nd", "nl", "no", -- numbers - "ps", "pi", -- initial - -- "pe", "pf", -- final - -- "pc", "pd", "po", -- punctuation - "sm", "sc", "sk", "so", -- symbols - -- "zs", "zl", "zp", -- separators - -- "cc", "cf", "cs", "co", "cn", -- others -} - -local function autonextspace(str) -- todo: make a real not intrusive lookahead - local b = lpegmatch(p_check,str) - if b then - local d = chardata[b] - if d and can_have_space[d.category] then - context.space() - end - end -end - -interfaces.implement { - name = "autonextspace", - actions = autonextspace, - arguments = "string", -} |