summaryrefslogtreecommitdiff
path: root/tex/context/base/bibl-bib.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/bibl-bib.lua')
-rw-r--r--tex/context/base/bibl-bib.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/tex/context/base/bibl-bib.lua b/tex/context/base/bibl-bib.lua
index 2df2f9507..efc68fe59 100644
--- a/tex/context/base/bibl-bib.lua
+++ b/tex/context/base/bibl-bib.lua
@@ -16,6 +16,8 @@ local lower, format, gsub = string.lower, string.format, string.gsub
local next = next
local lpegmatch = lpeg.match
+local trace_bibxml = false trackers.register("publications.bibxml", function(v) trace_bibtex = v end)
+
bibtex = bibtex or { }
bibtex.size = 0
@@ -109,7 +111,13 @@ end
function bibtex.load(session,filename)
local filename = resolvers.find_file(filename,"bib")
if filename ~= "" then
- bibtex.convert(session,io.loaddata(filename) or "")
+ local data = io.loaddata(filename) or ""
+ if data == "" then
+ logs.report("publications","empty file '%s', no conversion to xml",filename)
+ elseif trace_bibxml then
+ logs.report("publications","converting file '%s' to xml",filename)
+ end
+ bibtex.convert(session,data)
end
end