summaryrefslogtreecommitdiff
path: root/tex/context/base/publ-jrn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/publ-jrn.lua')
-rw-r--r--tex/context/base/publ-jrn.lua42
1 files changed, 34 insertions, 8 deletions
diff --git a/tex/context/base/publ-jrn.lua b/tex/context/base/publ-jrn.lua
index 91df21904..2e0408417 100644
--- a/tex/context/base/publ-jrn.lua
+++ b/tex/context/base/publ-jrn.lua
@@ -137,14 +137,40 @@ function journals.abbreviated(name)
return abbreviations[s] or abbreviations[simplify(expansions[s])] or name
end
-local commands, context = commands, context
-
-if commands then
- commands.btxloadjournallist = journals.load
- commands.btxsavejournallist = journals.save
- commands.btxaddjournal = function(...) context(journals.add(...)) end
- commands.btxexpandedjournal = function(name) context(journals.expanded(name)) end
- commands.btxabbreviatedjournal = function(name) context(journals.abbreviated(name)) end
+local implement = interfaces and interfaces.implement
+
+if implement then
+
+ implement {
+ name = "btxloadjournallist",
+ arguments = "string",
+ actions = journals.load
+ }
+
+ implement {
+ name = "btxsavejournallist",
+ arguments = "string",
+ actions = journals.save
+ }
+
+ implement {
+ name = "btxaddjournal",
+ arguments = { "string", "string" },
+ actions = { journals.add, context }
+ }
+
+ implement {
+ name = "btxexpandedjournal",
+ arguments = "string",
+ actions = { journals.expanded, context },
+ }
+
+ implement {
+ name = "btxabbreviatedjournal",
+ arguments = "string",
+ actions = { journals.abbreviated, context },
+ }
+
end
-- journals.load("e:/tmp/journals.txt")