[Tex/LaTex] Engines of Tex-Editors and Biber/Biblatex

biberbiblatexluatextexshop

Today I detected that biblatex, biber or whatever is responsible for citations and bibliography does not work correctly on my tex-files. I can think of two reasons for it:

Maybe my engine-file (I am calling it engine-file because it is in the engine-folder of my TexShop-folder) is not well written or does not work with the latest update (if there was such an update…). This is my engine-file:

#!/bin/tcsh

set path= ($path /usr/texbin /usr/local/bin /opt/local/bin/)
lualatex -file-line-error -synctex=1 "$1"
biber "${1:r}"

lualatex -file-line-error -synctex=1 "$1"

Or the following error is responsible:

ERROR - Error loading data source package 'Biber::Input::file::bibtex': data source /var/folders/zE/zEWMdMuCGnyHENetv8k-CU+++TI/-Tmp-/par-User/cache-5a7f3069e2a4d51fd3557003fc55ec74c554c947//inc/lib/Biber/Input/file/bibtex.dcf not found in .
Compilation failed in require at (eval 71) line 2.

It looks like this error might cause the trouble. However, I do not know what could have caused the error… I did not delete any file (e.g., the bibtex.dcf, which the error message claims not to have found).

I have two additional questions:
Are there differences between different editors when it comes to how the engine-file should look like?
Is the engine-file I am using ok as it is? (I do not understand a single word of that file)

Best Answer

Too long for a comment, and more or less an answer:

  • Are you sure this is the actual engine you are using? It should begin with #! not just !. Also, make sure your distribution is up-to-date. The error you're getting looks more like a biber problem. See egreg's answer for the solution to this.
  • Unless you have MacPorts installed, you don't need /opt/local/bin in your path. (and even then, you probably don't need it).
  • This engine won't actually do what you intend it to do (i.e. resolve the references correctly.) You would need an additional lualatex line to do that.

I would suggest as an alternative to use the lualatexmk engine which comes with TeXShop. If it's not active, go to ~/Libary/TeXShop/Engines and move it from the Inactive folder to the Engines folder. You will need to quit out of TeXShop to have the change take effect.

Then in your document you can just add:

% !TEX TS-program = lualatexmk

and this engine will be chosen automatically. You can insert this line by using the Program item from the Macros menu.

Related Question