From 055c71f6b8d7df1549ae45f9ab20a5d4e3a26c6b Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 17 Nov 2012 01:00:14 +0200 Subject: beta 2012.11.16 23:51 --- scripts/context/lua/mtx-patterns.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'scripts') diff --git a/scripts/context/lua/mtx-patterns.lua b/scripts/context/lua/mtx-patterns.lua index a436b0157..86f63bb16 100644 --- a/scripts/context/lua/mtx-patterns.lua +++ b/scripts/context/lua/mtx-patterns.lua @@ -16,6 +16,7 @@ local helpinfo = [[ --check check pattern file (or those used by context when no file given) --path source path where hyph-foo.tex files are stored --destination destination path +--specification additional patterns: e.g.: =cy,hyph-cy,welsh examples of usage: @@ -454,7 +455,19 @@ function scripts.patterns.save(destination,mnemonic,name,patternsnew,hyphenation end function scripts.patterns.prepare() + -- dofile(resolvers.findfile("char-def.lua")) + -- + local specification = environment.argument("specification") + if specification then + local components = utilities.parsers.settings_to_array(specification) + if #components == 3 then + table.insert(scripts.patterns.list,1,components) + report("specification added: %s %s %s",table.unpack(components)) + else + report('invalid specification: %q, "xx,lang-yy,zzzz" expected',specification) + end + end end function scripts.patterns.check() -- cgit v1.2.3