I am having trouble getting latex to access the .bib file that jabref saves.
When I compile I get the warning “Citation XXX on page X undefined on input line XXX”.
In order to cite from a library, I need to export a subset of the entries as a separate .bib file and use that in my \addbibresource{} call in latex.
Did I miss something or were we suppose to directly use the jabref database?
I am using biblatex.
I am running latex via the sublime text plugin LatexTools. I think the plugin sorts out the compiling commands. I also don’t think the issue is with LatexTools because it does work if I select a subset of the database and export as a separate .bib file.
If I had to guess I would say that it could be some issue that comes up if latex and Jabref are reading the file at the same time(?).
Or maybe there is some refs that have wonky formatting that causes latex to not recognise the .bib file (?).
Quite the opposite actually!
If I use the escape character then latex can’t find the file. I have tried both _ and \_ in the file names and only _ works.
I have found some extra info too (that might be useful for someone else).
With Latextools, I need to clear the cache if biblatex give errors before trying again. Even on the working subsetted version of the .bib file, I needed to clear the cache.
It doesn’t seem to be an issue with compiling Latex while the .bib file is open in JabRef. I tested compiling and editing in JabRef on the working subsetted .bib file and I had no issues.
I guess there is a ref in my library that has something special about it that is causing some trouble.
It is definitely something in my library. I exported my entire library to an intermediate .bib file for compiling and it gave the same issues.
If I subset parts of the library and replace the intermediate .bib file, everything compiles without issue.
The intermediate .bib file is what Latex is using.
I have a new question:
Is there a recommended way to ‘hide’ entries in my library so that it is not exported to the bib file (and I can filter out which ever entry is causing the problem)?
Since the library is stored as a bib file, I am guessing I will have to move all my poorly-formatted entries to a separate library until they have been checked.
Then open the non-working library you want to compile with a text editor and use the 50% rule to debug things:
Put a % somewhere in the middle of the file → save the file → then try to compile.
If compilation works, the fault must be in the second half of your file. If compilation does NOT work, the fault must be in the first half of your file.
Repeat this process until you hit the entry that gives problems.
To better visualise, it might help you to think of it as if you were cutting a cake in ever smaller slices. 1/1 (Full cake) → 1/2 (half the cake)–> 1/4 → 1/8 → 1/16 → 1/16 → 1/32 → 1/64 → …
You will find the fault pretty fast.
PS: % is a special character in latex: it marks everything that comes after it as a comment
Often, I encounter the same problem of one erroneous entry in a .bib file affecting the compilation. Usually, the output will help with finding the issue. Do you have an error like ‘I’m skipping whatever remains of this file’? If so, it is usually preceded by the offending entry.
JabRef does not do the compilation, therefore JabRef does not have such a command.
If you use biblatex, you could check Biber for sophisticated commands. If you use other compilation methods, then you would need to check these other compilation processing backends.
What I have done now (because I needed a functioning library) is I have moved all my quality checked refs in one library and everything else in another library. Every new entry goes to the ‘dumping ground’ until I have read it and am sure that it is something I will use. I add it to a QC group in the dumping ground library and at some point later I move all the QC group entries to the functional library.