summaryrefslogtreecommitdiff
path: root/tex/context/base/publ-usr.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/publ-usr.lua')
-rw-r--r--tex/context/base/publ-usr.lua7
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",