[Tex/LaTex] Modular TeX and Missing Bibliography

biblatex

I am using SublimeText3, Biblatex (v2.8a), and Biber (v1.8). I have successfully compiled a bibliography and citations multiple times in the past. After switching to a modular design for my document, the bibliography stopped appearing even after removing the modules and reverting to a MWE (as shown below). I am getting citations like the popular, [Long1997 ], instead of 1.

I made no changes to my preamble, my build order, or package installations. I only added content. My debug process:

  1. Checked main.log(here) and main.bbl. "Missing 'biblatex' package" in bbl. Following error in .log:
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                first
(biblatex)                and rerun LaTeX afterwards.
  1. Double-checked preamble that has successfully compiled in the past. Looks fine.
  2. Double-checked biblatex is still installed. It is.
  3. Double-checked bib entry that has worked before. Looks fine.
  4. Double-checked build order that has worked before. Looks fine.
  5. Asked friends to double-check. No objections.

What am I missing?

main.tex:

\documentclass{report}
\usepackage[style=numeric,backend=biber]{biblatex}
\addbibresource{nbabib.bib}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

\begin{document}
asdf \cite{Long1997}

\nocite{*}               
\printbibliography
\end{document}

nbabib.bib:

@BOOK {Long1997,
AUTHOR = {Long, Scott},
TITLE = {Regression Models for Categorical and Limited Dependent Variables},
PUBLISHER = {Potomac Books},
ADDRESS = {Dulles, Virginia},
YEAR = {2004}}

My build file, LaTeX.sublime-build:

    "cmd": ["latexmk", 
            "latexmk",
            "biber",
            "latexmk",
            "-cd",
            "-e", 
            "\\$pdflatex = '%E -interaction=nonstopmode -synctex=1 %S %O'",
            //"-silent",
            "-f", "-pdf"],

Update:

  1. Removed conflicting \usepackage{cite} due to incompatibility with \usepackage{biblatex}.
  2. Updated all packages via Tex Live Utility.

Best Answer

Found the problem. I added entries to .bib that were missing commas between fields. After replacing the missing commas, compilation worked and citations show as [1], [2], etc. rather than [label ]. I see many tex.SO topics/other articles on the web titled "missing bibliography" related to the use of Biblatex and biber. A general debug process for newbies if you use those two packages (Google the terms you don't recognize or refer to your TeX texts):

  1. Check the main.log and main.blg. Can Biber find your bib (i.e. "Found BibTeX data source 'pathhere/main.bib'")
  2. Check your preamble. Syntax errors? Packages compatible with each other?
  3. Check all entries in your bib file. If any entry in the .bib has incorrect syntax, compilation will fail. Even if the specifc entry you are trying to cite may be correct. Best practices may dictate otherwise, but you can have a comma after the last field of an entry, and blank fields (e.g. YEAR = {}) will not prevent compilation. Biber will delete such null entries. Modulation (separating your long main.tex into multiple .tex files) should not cause problems with the bibliography unless one of your modules has unusual syntax.
  4. Are the biblatex and biber packages installed? On a Mac, you can check by accessing "Tex Live Utility" and clicking "Packages." You can also try updating your installed packages by clicking "Updates."
  5. Build order. Your document must call the sequence pdflatex->biber->pdflatex->pdflatex on main.tex to build the document. In my case, the default ST3 LaTeXTools build used "latexmk," which calls pdflatex.
  6. Search here. Google keywords of your error. Ask a friend. Ask in IRC chatroom #latex.
  7. Ask here.

*Note to TeXperts: Feel free to edit. I'm still learning TeX-speak.

Related Question