diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-05-23 23:24:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-05-23 23:24:00 +0200 |
commit | 95bcbd0f5d063383b13e749e10faa8683f48584d (patch) | |
tree | 32f17ef8223d743aad2f02cbcf309bf22c754828 /tex/context/base/publ-usr.lua | |
parent | e46e1337de173b3639e84d55095fe9463ceec73d (diff) | |
download | context-95bcbd0f5d063383b13e749e10faa8683f48584d.tar.gz |
beta 2014.05.23 23:24
Diffstat (limited to 'tex/context/base/publ-usr.lua')
-rw-r--r-- | tex/context/base/publ-usr.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/publ-usr.lua b/tex/context/base/publ-usr.lua index 6bb93ebee..e2100a289 100644 --- a/tex/context/base/publ-usr.lua +++ b/tex/context/base/publ-usr.lua @@ -6,6 +6,9 @@ if not modules then modules = { } end modules ['publ-usr'] = { license = "see context related readme files" } +local P, Cs, R, Cc, Carg = lpeg.P, lpeg.Cs, lpeg.R, lpeg.Cc, lpeg.Carg + +local settings_to_hash = utilities.parsers.settings_to_hash -- local chardata = characters.data -- local str = [[ @@ -30,8 +33,6 @@ local remapped = { arttitle = "title", } -local P, Cs, R, Cc, Carg = lpeg.P, lpeg.Cs, lpeg.R, lpeg.Cc, lpeg.Carg - local function register(target,key,a,b,c,d,e) key = remapped[key] or key if b and d and e then @@ -78,7 +79,7 @@ local value = optional^-1 * mandate^-1 * optional^-1 * mandate^-2 local pattern = ((Carg(1) * key * value) / register + P(1))^0 function publications.addtexentry(dataset,settings,content) - settings = utilities.parsers.settings_to_hash(settings) + settings = settings_to_hash(settings) local data = { tag = settings.tag or settings.k or "no tag", category = settings.category or settings.t or "article", |