diff options
author | Hans Hagen <pragma@wxs.nl> | 2009-09-11 18:14:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2009-09-11 18:14:00 +0200 |
commit | 31c85bed04f79cca40e26af118964bd86e8edd16 (patch) | |
tree | 64815e1310af371e9ad9f87913b7fa33357f0da2 /tex/context/base/bibl-tra.lua | |
parent | 8683bfc5e51de9f4436c7deebd9517c9f2779f0a (diff) | |
download | context-31c85bed04f79cca40e26af118964bd86e8edd16.tar.gz |
beta 2009.09.11 18:14
Diffstat (limited to 'tex/context/base/bibl-tra.lua')
-rw-r--r-- | tex/context/base/bibl-tra.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tex/context/base/bibl-tra.lua b/tex/context/base/bibl-tra.lua index b38fbae71..b2603a71d 100644 --- a/tex/context/base/bibl-tra.lua +++ b/tex/context/base/bibl-tra.lua @@ -13,16 +13,18 @@ local match, gmatch, format, concat, sort = string.match, string.gmatch, string. local texsprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes local variables, constants = interfaces.variables, interfaces.constants +local trace_bibtex = false trackers.register("publications.bibtex", function(v) trace_bibtex = v end) + local hacks = bibtex.hacks local list, done, alldone, used, registered, ordered = { }, { }, { }, { }, { }, { } local mode = 0 -local template = [[ +local template = string.striplong([[ \citation{*} - \bibstyle{%s} + \bibstyle{cont-%s} \bibdata{%s} -]] +]]) function hacks.process(settings) local style = settings.style or "" @@ -31,12 +33,18 @@ function hacks.process(settings) if database ~= "" then interfaces.showmessage("publications",3) io.savedata(file.addsuffix(jobname,"aux"),format(template,style,database)) + if trace_bibtex then + logs.report("publications","processing bibtex file '%s'",jobname) + end os.execute(format("bibtex %s",jobname)) -- purge 'm end end function hacks.register(str) + if trace_bibtex then + logs.report("publications","registering bibtex entry '%s'",str) + end registered[#registered+1] = str ordered[str] = #registered end |